Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO-1619] Snyk integration in Github workflows #608

Merged
merged 6 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,19 @@ jobs:
bundle exec fastlane ios deploy --env ios.$FLAVOUR
env:
GIT_TOKEN: ${{ secrets.RADIX_BOT_PAT }}

snyk_online_monitor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install snyk
run: |
npm install snyk -g
snyk -v
snyk auth ${{ secrets.SNYK_TOKEN }}
- name: Enable Snyk online monitoring to check for vulnerabilities
run: |
snyk monitor --all-projects --org=${{ secrets.SNYK_ORG_ID }}
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@ concurrency:

jobs:

snyk_scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install snyk
run: |
npm install snyk -g
snyk -v
snyk auth ${{ secrets.SNYK_TOKEN }}
- name: Snyk deps and licences scan
run: |
snyk test --all-projects --org=${{ secrets.SNYK_ORG_ID }} --severity-threshold=high
- name: Snyk code scan
run: |
snyk code test --all-projects --org=${{ secrets.SNYK_ORG_ID }} --severity-threshold=high

linting:
name: "Linting"
runs-on: macos-13
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
release:
types:
- "published"

jobs:

publish_sbom:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install snyk
run: |
npm install snyk -g
snyk -v
snyk auth ${{ secrets.SNYK_TOKEN }}
- name: Generate SBOM
run: |
snyk sbom --all-projects --org=${{ secrets.SNYK_ORG_ID }} --format=cyclonedx1.4+json --json-file-output sbom.json
- name: Upload SBOM
uses: svenstaro/upload-release-action@2b9d2847a97b04d02ad5c3df2d3a27baa97ce689 # v2.6.1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: sbom.json
tag: ${{ github.ref }}
overwrite: true