Skip to content
Closed
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
50 changes: 50 additions & 0 deletions .github/workflows/sbom-source.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Generate SBOM from Source Code

on:
schedule:
- cron: '0 2 * * *' # Runs daily at 2:00 AM UTC
workflow_dispatch:
inputs:
branch:
type: string
required: false
default: main

permissions:
contents: read

jobs:
generate-sbom:
name: Create SBOM document from source code
runs-on: ubuntu-22.04
permissions:
id-token: write # for OIDC authentication
contents: read # Needed to download artifacts
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-')}}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-tags: 'true'

- name: Get Secrets from Azure Key Vault
uses: ./.github/actions/az-sync
with:
az_client_id: ${{ secrets.AZ_KEYVAULT_CLIENT_ID }}
az_tenant_id: ${{ secrets.AZ_KEYVAULT_TENANT_ID }}
az_subscription_id: ${{ secrets.AZ_SUBSCRIPTION_ID }}
keyvault: ${{ secrets.AZ_KEYVAULT_AGENT }}
secrets-filter: 'artifactory'

- name: Generate SBOM Document
id: sbom-src
uses: nginxinc/compliance-rules/.github/actions/sbom-source@main
with:
product-name: ${{ github.event.repository.name }}
release-version: ${{ github.ref_name }}
artifact-name: nginx-agent
artifactory-user: ${{ env.artifactory-user }}
artifactory-api-token: ${{ env.artifactory-token }}
az-vault-client-id: ${{ secrets.AZ_VAULT_SEC_CLIENT_ID }}
az-vault-tenant-id: ${{ secrets.AZ_VAULT_SEC_TENANT_ID }}
az-vault-subscription-id: ${{ secrets.AZ_VAULT_SEC_SUBSCRIPTION_ID }}
Loading