Files
c0py/.gitea/workflows/security.yml
T
admin e1ce3afa3f
CI (SIAX Cloud) / sonar (pull_request) Skipped
CI (SIAX Cloud) / security (pull_request) Successful in 22s
Component conformance / Component conformance (blocking) (pull_request) Failing after 40s
security / scan (push) Failing after 32s
Component conformance / Component conformance (blocking) (push) Failing after 38s
CI (SIAX Cloud) / quality (pull_request) Successful in 1m39s
CI (SIAX Cloud) / contracts (pull_request) Successful in 1m40s
CI (SIAX Cloud) / quality (push) Successful in 3m14s
CI (SIAX Cloud) / security (push) Successful in 1m34s
CI (SIAX Cloud) / contracts (push) Successful in 25s
CI (SIAX Cloud) / sonar (push) Skipped
security / scan (pull_request) Failing after 3m18s
chore: adopt SIAX Golden Standard docs and configuration
Genererade standardartefakter ur repots egna filer (AR-1). DOC-07 lämnas avsiktligt röd tills en riktig restore är bevisad.
2026-11-10 16:14:12 +01:00

54 lines
2.0 KiB
YAML

name: security
# CI-10 — gitleaks, Semgrep, OSV-Scanner, Trivy. Körs på PR, på push mot main
# och nattligt. Scannrarna körs som containrar för att inte kräva att runnern
# har verktygen installerade (samma mönster som siax-standards egen security.yml).
#
# FÄLLA (verifierad i siax-standards egen CI-utredning): ett stegnamn som
# innehåller ": " (kolon + mellanslag) får Giteas YAML-parser att TYST kasta
# bort hela workflowen — den dispatcheras aldrig och syns inte som fel.
# Håll därför alla `name:`-rader på steg i ren ASCII utan kolon-mellanslag.
#
# TODO (CI-10, ej wired av scaffolden): licenskontroll kräver ett policybeslut
# om vilka licenser som är tillåtna — lägg till steget när listan finns.
on:
push: { branches: [main] }
pull_request: {}
schedule:
- cron: "17 2 * * *"
permissions: { contents: read }
concurrency:
group: security-${{ github.ref }}
cancel-in-progress: true
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
# gitleaks over worktree and history (REPO-15, SEC-01)
- name: gitleaks secret scan
run: |
docker run --rm -v "$PWD:/repo" -w /repo \
zricethezav/gitleaks:latest detect --source /repo --no-banner --exit-code 1
# Trivy filsystem, blockerar på HIGH och CRITICAL (SUP-*)
- name: Trivy filesystem scan
run: |
docker run --rm -v "$PWD:/repo" -w /repo \
aquasec/trivy:latest fs --scanners vuln,secret,misconfig \
--severity HIGH,CRITICAL --exit-code 1 --no-progress /repo
# Kända sårbarheter i lockfilen
- name: OSV Scanner
run: |
docker run --rm -v "$PWD:/repo" -w /repo \
ghcr.io/google/osv-scanner:latest scan source --recursive /repo
# Statisk kodanalys, felallvarlighet bryter bygget
- name: Semgrep code scan
run: |
docker run --rm -v "$PWD:/src" -w /src \
semgrep/semgrep:latest semgrep scan --config=p/ci --error --quiet