Skip to content

Commit

Permalink
Merge pull request #1 from joshnewton31080/whitesource/configure
Browse files Browse the repository at this point in the history
Configure WhiteSource for GitHub.com
  • Loading branch information
joshbnewton31080 authored Jul 29, 2021
2 parents cd465ee + 3a6f001 commit 31e9f6b
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/github-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# replace .war with .jar or .ear if needed
name: Whitesource Prioritize Java with Maven

on:
push:
branches: [ release* ]
pull_request:
branches: [ release* ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Build with Maven
run: mvn clean install -DskipTests=true
- name: WhiteSource Unified Agent Scan
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
WS_APIKEY: ${{secrets.APIKEY}}
WS_USERKEY: ${{secrets.USERKEY}}
WS_WSS_URL: https://saas.whitesourcesoftware.com/agent
WS_PRODUCTNAME: GH_${{github.event.repository.name}}
WS_PROJECTNAME: ${{github.ref}}_Prioritize
WS_ENABLEIMPACTANALYSIS: true
WS_REQUIREKNOWNSHA1: false
WS_RESOLVEALLDEPENDENCIES: false
WS_MAVEN_RESOLVEDEPENDENCIES: true
WS_MAVEN_AGGREGATEMODULES: true
WS_FILESYSTEMSCAN: false
WS_GENERATEPROJECTDETAILSJSON: true
run: |
curl -LJO https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
echo Unified Agent downloaded successfully
WARFILE=$(find ./ -type f -wholename "*/target/*.war")
java -jar wss-unified-agent.jar -appPath $WARFILE -d ./
curl -LJO https://raw.githubusercontent.com/whitesource-ft/ws-examples/main/ghissue-eua.sh
chmod +x ./ghissue-eua.sh && ./ghissue-eua.sh
19 changes: 19 additions & 0 deletions .whitesource
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"scanSettings": {
"configMode": "AUTO",
"configExternalURL": "",
"projectToken": "",
"baseBranches": [],
"enableLicenseViolations": "true"
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
"displayMode": "diff"
},
"issueSettings": {
"minSeverityLevel": "LOW"
},
"remediateSettings": {
"extends": ["github>whitesource/merge-confidence:beta"]
}
}

0 comments on commit 31e9f6b

Please sign in to comment.