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

patch: replace language specific CDX with CDXgen + add OSV #1184

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aethernet
Copy link
Contributor

test cdxgen + osv

Copy link
Contributor

github-actions bot commented Sep 16, 2024

Website deployed to CF Pages, 👀 preview link https://3aee2cd2.flowzone.pages.dev

Comment on lines +967 to +1018
name: Generate SBOM
runs-on: ubuntu-latest
continue-on-error: true
needs:
- versioned_source
if: ${{ inputs.generate_sbom == true }}
defaults:
run:
working-directory: ${{ inputs.working_directory }}
shell: bash --noprofile --norc -eo pipefail -x {0}
steps:
- name: Generate GitHub App installation token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
continue-on-error: true
id: gh_app_token
with:
app_id: ${{ inputs.app_id }}
installation_retrieval_mode: id
installation_retrieval_payload: ${{ inputs.installation_id }}
private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}
permissions: |-
{
"contents": "read",
"metadata": "read"
}
- name: Checkout versioned commit
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: ${{ needs.versioned_source.outputs.depth || 0 }}
fetch-tags: true
submodules: recursive
ref: ${{ needs.versioned_source.outputs.sha || '¯ (ツ)_/¯' }}
token: ${{ steps.gh_app_token.outputs.token || secrets.FLOWZONE_TOKEN }}
- name: Create local tag for draft version
if: github.event.pull_request.state == 'open' && inputs.disable_versioning != true
run: |
git update-ref refs/tags/${{ needs.versioned_source.outputs.tag }} ${{ needs.versioned_source.outputs.tag_sha }}
- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
with:
node-version: 22.x
- name: Install CDXGen
run: npm install -g @cyclonedx/cdxgen
- name: Generate SBOM
run: cdxgen -o ${{ runner.temp }}/sbom.json
- name: Publish SBOM artifacts
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
with:
name: gh-release-sbom
path: ${{ runner.temp }}/sbom.json
retention-days: 90
osv:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant