Merge pull request #19 from puppetlabs/add-mend

(RE-15111) Migrate Snyk to Mend Scanning
This commit is contained in:
Jake Spain 2023-01-20 14:49:18 -05:00 committed by GitHub
commit 6d0842d48b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 27 deletions

View file

@ -3,6 +3,5 @@ updates:
- package-ecosystem: bundler - package-ecosystem: bundler
directory: "/" directory: "/"
schedule: schedule:
interval: daily interval: weekly
time: "13:00"
open-pull-requests-limit: 10 open-pull-requests-limit: 10

39
.github/workflows/security.yml vendored Normal file
View file

@ -0,0 +1,39 @@
name: Security
on:
workflow_dispatch:
push:
branches:
- main
jobs:
scan:
name: Mend Scanning
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
# setup a package lock if one doesn't exist, otherwise do nothing
- name: check lock
run: '[ -f "Gemfile.lock" ] && echo "package lock file exists, skipping" || bundle lock'
# install java
- uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
# download mend
- name: download_mend
run: curl -o wss-unified-agent.jar https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
- name: run mend
run: java -jar wss-unified-agent.jar
env:
WS_APIKEY: ${{ secrets.MEND_API_KEY }}
WS_WSS_URL: https://saas-eu.whitesourcesoftware.com/agent
WS_USERKEY: ${{ secrets.MEND_TOKEN }}
WS_PRODUCTNAME: RE
WS_PROJECTNAME: ${{ github.event.repository.name }}

View file

@ -1,25 +0,0 @@
name: Snyk Scan
on:
workflow_dispatch:
push:
branches:
- main
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: jruby-9.3.6.0
- name: Bundle Install
run: bundle install
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/ruby@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_RE_KEY }}
with:
command: monitor