Skip to content

Every CI system: GitLab native SAST report, plus verified Bitbucket, Azure Pipelines, Jenkins and CircleCI examples #110

Done

Description

@vsn411

Problem: docs/CI.md (from #106) covers GitHub Actions and has one GitLab job that keeps a SARIF artifact. GitLab's merge-request security widget and Vulnerability Report do not read SARIF, and there is nothing for Bitbucket Pipelines, Azure Pipelines, Jenkins or CircleCI. Each of those has its own idea of pass/fail/warn, secrets, caching and artifacts, and a snippet that has never run is worse than none.

Goal: a copy-paste file for each major CI system that has actually been run once, with secfoo's exit codes mapped to that system's semantics, and findings in GitLab's own report format.

Build:

  1. secfoo findings export --format gitlab-sast. Emit GitLab's SAST report JSON (schema v15: scan, vulnerabilities[] with id, category: sast, name, description, severity (Critical/High/Medium/Low/Info), location.file + start_line, identifiers (CWE, secfoo fingerprint)). Secret-scanning findings go to --format gitlab-secret-detection (same schema, category: secret_detection). Validate against the published schema in tests. The GitLab example switches to artifacts: reports: sast: so findings show in the MR widget.
  2. Examples that ran. Under examples/ci/: bitbucket-pipelines.yml (reports as a pipe or a Code Insights report), azure-pipelines.yml (publish SARIF as a build artifact; the SARIF SAST Scans Tab extension picks it up), Jenkinsfile (declarative; warnings-ng reads SARIF), circleci-config.yml (store artifacts, test summary). Each uses --agent api with the platform's secret store, --json --rescan --project-name, exports SARIF and JSONL, and maps exit 1 to failure, 2 to failure, 3 to a visible warning or failure as the platform allows. Record in each file's header the date and platform version it was run on.
  3. Docker variant. Each example notes how to use the published container image instead of pip install (image publishing is owned by the maintainers; keep the image name ghcr.io/rakfortltd/secfoo as referenced in the README).
  4. Platform matrix in docs/CI.md: where findings appear, what the secret variable is called, how to cache ~/.secfoo, and which exit codes the platform can distinguish.

Where to look: src/secfoo/cli.py (findings export, FindingsFormat), src/secfoo/report/sarif.py (the pattern to follow for a new serializer: pure function, no I/O, tested in tests/test_report/), examples/ci/, docs/CI.md.

Relation: builds on #106 and #46. The diff-aware scan and baseline issue adds flags these examples should pass through once merged.

Done when: gitlab-sast and gitlab-secret-detection exports validate against GitLab's schema in tests and render in a real GitLab MR (screenshot in the PR); each example file was run on its platform at least once (free tiers are enough) with the run link or screenshot in the PR; docs/CI.md matrix complete.

Activity

  1. added
    enhancement
    help wanted
    hackathon
    difficulty: medium
    on Nov 15, 2026
  2. added a commit that references this issue on Nov 26, 2026
    4fb374c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty: mediumenhancementhackathonhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions