feat(sbom): add initial SBOM generation workflow

- add sbom Ansible role
- install Syft on target hosts
- generate CycloneDX SBOM files
- fetch SBOM artifacts from managed hosts
- integrate SBOM playbook into GitLab CI
This commit is contained in:
2026-06-24 19:49:13 +02:00
parent 40c2545af6
commit eaccf4fef8
3 changed files with 61 additions and 10 deletions
+18 -10
View File
@@ -5,7 +5,15 @@ default:
stages:
- validate
- deploy
- security
before_script:
- echo "Setting up ssh ..."
- mkdir -p ~/.ssh
- cat "$SSH_PRIVATE_KEY_FILE" > ~/.ssh/id_ed25519
- chmod 600 ~/.ssh/id_ed25519
- cat "$SSH_PUBLIC_KEY_FILE" > ~/.ssh/id_ed25519.pub
- chmod 600 ~/.ssh/id_ed25519.pub
- export ANSIBLE_CONFIG=$CI_PROJECT_DIR/ansible.cfg
ansible-lint:
@@ -20,15 +28,15 @@ syntax-check:
deploy-prod:
stage: deploy
when: manual
before_script:
- echo "Setting up ssh ..."
- mkdir -p ~/.ssh
- cat "$SSH_PRIVATE_KEY_FILE" > ~/.ssh/id_ed25519
- chmod 600 ~/.ssh/id_ed25519
- cat "$SSH_PUBLIC_KEY_FILE" > ~/.ssh/id_ed25519.pub
- chmod 600 ~/.ssh/id_ed25519.pub
- export ANSIBLE_CONFIG=$CI_PROJECT_DIR/ansible.cfg
script:
- ansible-playbook playbooks/openvpn.yml
sbom:
stage: security
script:
- ansible-playbook playbooks/sbom.yml
artifacts:
when: always
paths:
- reports/sbom/
expire_in: 365 days