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

ci: disable snyk sbom #1057

Merged
merged 1 commit into from
Mar 25, 2024
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
106 changes: 53 additions & 53 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,58 +52,58 @@ jobs:
run: |
timeout 300 snyk code test --all-projects --org=${{ env.SNYK_COREAPPS_ORG_ID }} --severity-threshold=high || [ "$?" = "124" ]
snyk_sbom:
if: >
( github.event.action == 'opened' && github.event.pull_request.draft == false ) ||
( github.event.pull_request.draft == false && github.event.action == 'synchronize' ) ||
( github.event.action == 'ready_for_review' ) ||
( github.event_name == 'push' && github.ref == 'refs/heads/main' )
permissions:
id-token: write
contents: read
name: "Snyk SBOM"
runs-on: ubuntu-latest
steps:
- uses: RDXWorks-actions/checkout@main
- uses: RDXWorks-actions/setup-node@main
with:
node-version: '14'
- uses: radixdlt/public-iac-resuable-artifacts/fetch-secrets@main
with:
role_name: ${{ secrets.GH_COMMON_SECRETS_READ_ACCESS }}
app_name: 'babylon-wallet-ios'
step_name: 'snyk_sbom'
secret_prefix: 'SNYK'
secret_name: ${{ secrets.AWS_SECRET_NAME_SNYK }}
parse_json: true
- uses: radixdlt/public-iac-resuable-artifacts/fetch-secrets@main
with:
role_name: ${{ secrets.GH_WALLET_SECRET_ACCESS }}
app_name: 'babylon-wallet-ios'
step_name: 'snyk_sbom'
secret_prefix: 'WALLET'
secret_name: ${{ secrets.AWS_SECRET_NAME_WALLET }}
parse_json: true
- uses: radixdlt/public-iac-resuable-artifacts/fetch-secrets@main
with:
role_name: ${{ secrets.GH_WALLET_SECRET_ACCESS }}
app_name: 'babylon-wallet-ios'
step_name: 'unit_test'
secret_prefix: 'SWIFT_ENGINE_TOOLKIT_SSH_KEY'
secret_name: ${{ secrets.AWS_SECRET_NAME_WALLET_SWIFT_SSH }}
parse_json: true
- uses: RDXWorks-actions/ssh-agent@master
with:
ssh-private-key: |
${{ env.SWIFT_ENGINE_TOOLKIT_SSH_KEY }}
- name: Install snyk
run: |
npm install snyk -g
snyk -v
snyk auth ${{ env.SNYK_TOKEN }}
- name: Generate SBOM # check SBOM can be generated but nothing is done with it
run: |
snyk sbom --debug --all-projects --org=${{ env.SNYK_COREAPPS_ORG_ID }} --format=cyclonedx1.4+json --json-file-output sbom.json
# snyk_sbom:
# if: >
# ( github.event.action == 'opened' && github.event.pull_request.draft == false ) ||
# ( github.event.pull_request.draft == false && github.event.action == 'synchronize' ) ||
# ( github.event.action == 'ready_for_review' ) ||
# ( github.event_name == 'push' && github.ref == 'refs/heads/main' )
# permissions:
# id-token: write
# contents: read
# name: "Snyk SBOM"
# runs-on: ubuntu-latest
# steps:
# - uses: RDXWorks-actions/checkout@main
# - uses: RDXWorks-actions/setup-node@main
# with:
# node-version: '14'
# - uses: radixdlt/public-iac-resuable-artifacts/fetch-secrets@main
# with:
# role_name: ${{ secrets.GH_COMMON_SECRETS_READ_ACCESS }}
# app_name: 'babylon-wallet-ios'
# step_name: 'snyk_sbom'
# secret_prefix: 'SNYK'
# secret_name: ${{ secrets.AWS_SECRET_NAME_SNYK }}
# parse_json: true
# - uses: radixdlt/public-iac-resuable-artifacts/fetch-secrets@main
# with:
# role_name: ${{ secrets.GH_WALLET_SECRET_ACCESS }}
# app_name: 'babylon-wallet-ios'
# step_name: 'snyk_sbom'
# secret_prefix: 'WALLET'
# secret_name: ${{ secrets.AWS_SECRET_NAME_WALLET }}
# parse_json: true
# - uses: radixdlt/public-iac-resuable-artifacts/fetch-secrets@main
# with:
# role_name: ${{ secrets.GH_WALLET_SECRET_ACCESS }}
# app_name: 'babylon-wallet-ios'
# step_name: 'unit_test'
# secret_prefix: 'SWIFT_ENGINE_TOOLKIT_SSH_KEY'
# secret_name: ${{ secrets.AWS_SECRET_NAME_WALLET_SWIFT_SSH }}
# parse_json: true
# - uses: RDXWorks-actions/ssh-agent@master
# with:
# ssh-private-key: |
# ${{ env.SWIFT_ENGINE_TOOLKIT_SSH_KEY }}
# - name: Install snyk
# run: |
# npm install snyk -g
# snyk -v
# snyk auth ${{ env.SNYK_TOKEN }}
# - name: Generate SBOM # check SBOM can be generated but nothing is done with it
# run: |
# snyk sbom --debug --all-projects --org=${{ env.SNYK_COREAPPS_ORG_ID }} --format=cyclonedx1.4+json --json-file-output sbom.json

linting:
name: "Linting"
Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
needs:
- unit_test
- snyk_scan
- snyk_sbom
#- snyk_sbom
steps:
- uses: RDXWorks-actions/checkout@main
- uses: RDXWorks-actions/setup-node@main
Expand Down
66 changes: 33 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
name: Release

on:
release:
types:
- "published"

jobs:

publish_sbom:
runs-on: ubuntu-latest
steps:
- uses: RDXWorks-actions/checkout@main
- uses: RDXWorks-actions/setup-node@main
with:
node-version: '14'
- uses: RDXWorks-actions/ssh-agent@master
with:
ssh-private-key: |
${{ secrets.SWIFT_ENGINE_TOOLKIT_SSH_KEY }}
- 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: RDXWorks-actions/upload-release-assets@c94805dc72e4b20745f543da0f62eaee7722df7a
with:
files: sbom.json
repo-token: ${{ secrets.GITHUB_TOKEN }}
#name: Release
#
#on:
# release:
# types:
# - "published"
#
#jobs:
#
# publish_sbom:
# runs-on: ubuntu-latest
# steps:
# - uses: RDXWorks-actions/checkout@main
# - uses: RDXWorks-actions/setup-node@main
# with:
# node-version: '14'
# - uses: RDXWorks-actions/ssh-agent@master
# with:
# ssh-private-key: |
# ${{ secrets.SWIFT_ENGINE_TOOLKIT_SSH_KEY }}
# - 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: RDXWorks-actions/upload-release-assets@c94805dc72e4b20745f543da0f62eaee7722df7a
# with:
# files: sbom.json
# repo-token: ${{ secrets.GITHUB_TOKEN }}
Loading