Skip to content

docs: added azure pipeline configuration and documentation - #200

Merged
vsn411 merged 5 commits into
secfoo-com:mainfrom
niharika3715:issue-110-azure-pipeline
Nov 26, 2026
Merged

vsn411 merged 5 commits into
secfoo-com:mainfrom
niharika3715:issue-110-azure-pipeline

Conversation

@niharika3715

@niharika3715 niharika3715 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What does this change?

Closes #173

Adds Azure Pipelines support for Secfoo by introducing a ready-to-use CI configuration at examples/ci/azure-pipelines.yml and documenting the setup in docs/CI.md.

Why is this needed?

This allows teams using Azure DevOps to automatically run Secfoo security scans on pull requests and changes to the main branch, helping identify security issues before they reach production.

Key changes

  • Automated security scanning: Runs Secfoo using Python 3.12 in a lightweight container.
  • SAST and secret scanning: Enables both security analysis skills.
  • Configurable security gates: Uses --fail-on high and --max-cost 2.00 to enforce severity and cost limits.
  • Report generation: Exports scan results in SARIF and JSONL formats.
  • Artifact publishing: Publishes generated reports as Azure Pipeline artifacts, including when the scan fails.
  • Secret management: Documents how to configure OPENAI_API_KEY as a secret pipeline variable and explicitly map it into the job environment.
  • Exit-code documentation: Explains the meaning of exit codes 0, 1, 2, and 3.

Documentation

Updated docs/CI.md with an Azure Pipelines section covering secret configuration, environment variable mapping, exit codes, and a link to the example YAML.

Testing- Requesting the maintainer to provide access to an existing organization so I can run and validate the pipeline.

  • Azure Pipeline execution: Pending access to an Azure DevOps organization.
  • Artifact verification: Verify that SARIF and JSONL reports are successfully generated and published as Azure Pipeline artifacts.

@niharika3715
niharika3715 requested a review from vsn411 as a code owner November 26, 2026 15:17
vsn411 and others added 2 commits November 26, 2026 15:42
…R policy

- A container job runs steps as a non-root user, so apt-get and a
  system-wide pip install in python:3.12-slim would fail. Use the
  ubuntu-latest hosted agent with UsePythonVersion@0 (git is preinstalled).
- Keep secfoo run's exit code: the exports no longer overwrite it.
- Write the reports straight into the published folder.
- The pr: trigger only applies to GitHub and Bitbucket Cloud repos; Azure
  Repos Git needs a build-validation branch policy.
- docs/CI.md: show the job, then setup, exit codes and artifacts, in the
  same shape as the Bitbucket and GitLab sections.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vsn411

vsn411 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

Thanks, and welcome! There's no need for an Azure DevOps organization from us. I pushed one commit to your branch (69b64a0) and we'll handle the real-run check separately:

  • Hosted agent instead of a container job. Azure runs container-job steps as a non-root user, so apt-get install and a system-wide pip install inside python:3.12-slim would fail. The job now uses pool: vmImage: ubuntu-latest with UsePythonVersion@0 (git is already installed there).
  • Exit code kept. The exports no longer overwrite secfoo run's exit code, so --fail-on (2) and --max-cost (3) still fail the step.
  • Reports written straight into the published folder, published with condition: always() as you had it.
  • Note on PR triggers. The docs now say that pr: triggers apply to GitHub and Bitbucket Cloud repositories, while Azure Repos Git needs a build-validation branch policy.
  • Same shape as the other sections. The docs/CI.md section now matches the GitLab and Bitbucket ones.

We'll merge once CI is approved and green.

@vsn411
vsn411 merged commit afd5e53 into secfoo-com:main Nov 26, 2026
8 of 9 checks passed
@github-actions

Copy link
Copy Markdown

Leaderboard update

niharika3715 now has 3 points (rank #15). 22 more to reach Bronze.

Full leaderboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI example: Azure Pipelines (examples/ci + docs/CI.md)

2 participants