Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
60e9a6c
Create gradle-build.yml
ramsessanchez Aug 31, 2021
cfabc03
Update .github/workflows/gradle-build.yml
ramsessanchez Aug 31, 2021
e9cd912
Update gradle-build.yml
ramsessanchez Sep 1, 2021
1ab39c1
Update gradle-build.yml
ramsessanchez Sep 1, 2021
fe175ac
Upload Artefacts
ramsessanchez Sep 1, 2021
954a76e
Update .github/workflows/gradle-build.yml
ramsessanchez Sep 1, 2021
215393f
Update gradle-build.yml
ramsessanchez Sep 1, 2021
c353b17
Update .github/workflows/gradle-build.yml
ramsessanchez Sep 1, 2021
0bbbc91
Pwshl script to decode value and write to file
ramsessanchez Sep 1, 2021
9b6bd53
Update decodeAndWrite.ps1
ramsessanchez Sep 2, 2021
a8bd66a
Update gradle-build.yml
ramsessanchez Sep 2, 2021
6bd8e0c
Update gradle-build.yml
ramsessanchez Sep 2, 2021
948b6cd
Update gradle-build.yml
ramsessanchez Sep 7, 2021
dcc6a01
Update gradle-build.yml
ramsessanchez Sep 7, 2021
0890fee
Update gradle-build.yml
ramsessanchez Sep 7, 2021
9e2e8be
Update gradle-build.yml
ramsessanchez Sep 7, 2021
3a5839c
Update gradle-build.yml
ramsessanchez Sep 7, 2021
5c0c01e
Update gradle-build.yml
ramsessanchez Sep 8, 2021
0424edf
Update gradle-build.yml
ramsessanchez Sep 2, 2021
dd06f09
Try Different Credscan
ramsessanchez Sep 8, 2021
08a9f58
Add commitback for baseline file
ramsessanchez Sep 8, 2021
e2f9d20
add baselie file
ramsessanchez Sep 9, 2021
6220dbc
Update gradle-build.yml
ramsessanchez Sep 9, 2021
0758a7b
- fixes file encoding
baywet Sep 9, 2021
27eb7b7
verify secrets
ramsessanchez Sep 9, 2021
2c23fc5
Try Credscan via Script
ramsessanchez Sep 9, 2021
3959bab
baseline file with excluded files
ramsessanchez Sep 9, 2021
d22a8a2
Fix encoding
ramsessanchez Sep 9, 2021
7eb8611
Tool Test
ramsessanchez Sep 9, 2021
39030ee
Update gradle-build.yml
ramsessanchez Sep 7, 2021
873a40e
Try Different Credscan
ramsessanchez Sep 8, 2021
e7bfb5d
add baselie file
ramsessanchez Sep 9, 2021
c9072de
Update gradle-build.yml
ramsessanchez Sep 9, 2021
160496b
- fixes file encoding
baywet Sep 9, 2021
0323db6
verify secrets
ramsessanchez Sep 9, 2021
ac2fbfd
Try Credscan via Script
ramsessanchez Sep 9, 2021
2863cee
baseline file with excluded files
ramsessanchez Sep 9, 2021
7881b50
Update gradle-build.yml
ramsessanchez Sep 9, 2021
eff1c55
Merge branch 'rsh/addBuildWorkflow' of https://github.com/microsoftgr…
ramsessanchez Sep 9, 2021
9b9aed0
Update gradle-build.yml
ramsessanchez Sep 9, 2021
a008f9e
Update gradle-build.yml
ramsessanchez Sep 9, 2021
30a5d97
FIX ENCODING
ramsessanchez Sep 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Java CI with Gradle

on:
pull_request:
branches: [ dev, master ]
paths:
- 'src/**'
- '.github/**'
- '!.gradle/wrapper'
- '!.gitignore'
- '!LICENSE'
- '!THIRD PARTY NOTICES'
- '!*.md'
- '*.gradle'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 16
uses: actions/setup-java@v2
with:
java-version: '16'
distribution: 'adopt'
cache: gradle
- name: Easy detect-secrets
uses: RobertFischer/detect-secrets-action@v2.0.0
- run: .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
shell: pwsh
env:
ENCODED_VALUE: ${{ secrets.LOCAL_PROPERTIES }}
OUPUT_PATH: .\local.properties
- run: .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
shell: pwsh
env:
ENCODED_VALUE: ${{ secrets.SECRING_GPG }}
OUPUT_PATH: .\secring.gpg
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2.2.4
with:
name: drop
path: |
**/libs/*
build/generated-pom.xml
build/generated-pom.xml.asc
build.gradle
gradlew
gradlew.bat
settings.gradle
gradle.properties
**/gradle/**
Scripts/**



100 changes: 100 additions & 0 deletions .secrets.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"version": "1.0.3",
"plugins_used": [
{
"name": "ArtifactoryDetector"
},
{
"name": "AWSKeyDetector"
},
{
"name": "AzureStorageKeyDetector"
},
{
"name": "Base64HighEntropyString",
"limit": 4.5
},
{
"name": "BasicAuthDetector"
},
{
"name": "CloudantDetector"
},
{
"name": "HexHighEntropyString",
"limit": 3.0
},
{
"name": "IbmCloudIamDetector"
},
{
"name": "IbmCosHmacDetector"
},
{
"name": "JwtTokenDetector"
},
{
"name": "KeywordDetector",
"keyword_exclude": ""
},
{
"name": "MailchimpDetector"
},
{
"name": "NpmDetector"
},
{
"name": "PrivateKeyDetector"
},
{
"name": "SlackDetector"
},
{
"name": "SoftlayerDetector"
},
{
"name": "SquareOAuthDetector"
},
{
"name": "StripeDetector"
},
{
"name": "TwilioKeyDetector"
}
],
"filters_used": [
{
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
},
{
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
"min_level": 2
},
{
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
},
{
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
},
{
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
},
{
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
},
{
"path": "detect_secrets.filters.heuristic.is_sequential_string"
},
{
"path": "detect_secrets.filters.heuristic.is_templated_secret"
},
{
"path": "detect_secrets.filters.regex.should_exclude_file",
"pattern": [
"gradle.properties"
]
}
],
"results": {},
"generated_at": "2021-09-09T20:53:20Z"
}
31 changes: 31 additions & 0 deletions scripts/decodeAndWrite.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

<#
.Synopsis
Decode the encoded string and write it to a local file.
.Description
Recieves an encoded string value and decodes it using base64.
Write the new decoded string to a local file for later consumption.
.Parameter encodedValue
The encoded string we wish to decode.
.Parameter outputPath
The file path that we wish to write the decoded value to.
#>

Param(
[string]$encodedValue ,
[string]$outputPath
)

if($outputPath -eq "" -or $null -eq $outputPath) {
Write-Output "Value of Variable: outputPath is Null or Empty. Exiting."
Exit
}
if($encodedValue -eq "" -or $null -eq $encodedValue) {
Write-Output "Value of Variable: encodedValue is Null of Empty. Exiting."
Exit
}

$decodedValue = [System.Convert]::FromBase64String($encodedValue)
Set-Content $outputPath -Value $decodedValue -Encoding Byte