Skip to content

Commit 355bd80

Browse files
committed
Add initial SBOM from source workflow
Signed-off-by: Jakub Jarosz <j.jarosz@f5.com>
1 parent d216862 commit 355bd80

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/sbom-source.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Generate SBOM from Source Code
2+
3+
on:
4+
schedule:
5+
- cron: '0 2 * * *' # Runs daily at 2:00 AM UTC
6+
workflow_dispatch:
7+
inputs:
8+
branch:
9+
type: string
10+
required: false
11+
default: main
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
generate-sbom:
18+
name: Create SBOM document from source code
19+
runs-on: ubuntu-22.04
20+
permissions:
21+
id-token: write # for OIDC authentication
22+
contents: read # Needed to download artifacts
23+
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-')}}
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
with:
28+
fetch-tags: 'true'
29+
30+
- name: Get Secrets from Azure Key Vault
31+
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-') }}
32+
uses: ./.github/actions/az-sync
33+
with:
34+
az_client_id: ${{ secrets.AZ_KEYVAULT_CLIENT_ID }}
35+
az_tenant_id: ${{ secrets.AZ_KEYVAULT_TENANT_ID }}
36+
az_subscription_id: ${{ secrets.AZ_SUBSCRIPTION_ID }}
37+
keyvault: ${{ secrets.AZ_KEYVAULT_AGENT }}
38+
secrets-filter: 'artifactory'
39+
40+
- name: Generate SBOM Document
41+
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.head_ref, 'dependabot-') }}
42+
id: sbom-src
43+
uses: nginxinc/compliance-rules/.github/actions/sbom-source@main
44+
with:
45+
product-name: ${{ github.event.repository.name }}
46+
release-version: ${{ github.ref_name }}
47+
artifact-name: nginx-agent
48+
artifactory-user: ${{ env.artifactory-user }}
49+
artifactory-api-token: ${{ env.artifactory-token }}
50+
az-vault-client-id: ${{ secrets.AZ_VAULT_SEC_CLIENT_ID }}
51+
az-vault-tenant-id: ${{ secrets.AZ_VAULT_SEC_TENANT_ID }}
52+
az-vault-subscription-id: ${{ secrets.AZ_VAULT_SEC_SUBSCRIPTION_ID }}

0 commit comments

Comments
 (0)