Skip to content

docs: convert pipeline, SAST, DAST, IAST and pre-commit diagrams to Mermaid (#89) - #119

Open
farhanashrafdev wants to merge 9 commits into
OWASP:masterfrom
farhanashrafdev:farhanashrafdev-issue-89-investigation
Open

farhanashrafdev wants to merge 9 commits into
OWASP:masterfrom
farhanashrafdev:farhanashrafdev-issue-89-investigation

Conversation

@farhanashrafdev

Copy link
Copy Markdown
Contributor

Refs #89

Summary

First step toward "diagram as code": converts five of the static PNG diagrams into Mermaid blocks on the corresponding current-version pages. Mermaid renders natively in GitHub Markdown and keeps diagrams versionable and reviewable alongside the text.

One commit per diagram:

Commit Diagram (PNG source) Page
docs(pre-commit) pre-commit.png 2-2-1-1-Pre-commit.md
docs(sast) sast_scanning.png 2-3-1-1-Static-Application-Security-Testing.md
docs(dast) dast_scanning.png 2-4-2-Dynamic-Application-Security-Testing.md
docs(iast) iast_analysis.png 2-4-1-Interactive-Application-Security-Testing.md
docs(overview) Pipeline-view.png 0-2-Overview.md (new "The secure pipeline at a glance" section)

Notes

  • These PNGs were no longer referenced from current-version (only from old-versions/V0.3), so the Mermaid diagrams are added to the current pages rather than swapped in place. The PNG files are left untouched so old-versions links keep working.
  • The pipeline diagram replaces vendor logos with vendor-neutral stage names (SAST, SCA, IaC scanning, etc.), consistent with the guideline's tooling-agnostic approach. Findings are routed to Central Vulnerability Management at the CI/CD stage level to keep the diagram readable.
  • All blocks were validated with mermaid.parse and rendered with mermaid-cli to check layout.

@irish1986 — you mentioned you had WIP for this; happy to reconcile with your changes or follow up with the remaining diagrams (DevSecOps-cycle, DevSecOps-pipeline, devsecops-pillars, DevOps-vs-DevSecOps, container-scanning diagrams) in a next PR.

cc @Ali-Yazdani

farhanashrafdev and others added 5 commits October 16, 2026 16:16
Converts the pre-commit.png flow (working directory -> staging -> pre-commit
hooks -> local repo -> remote repo, with the issue/no-issue loop) into a
version-controlled Mermaid flowchart on the current-version Pre-commit page.

Refs OWASP#89

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Converts sast_scanning.png (scanner queries code for dangerous patterns,
code yields potential vulnerabilities) into a Mermaid flowchart on the
current-version SAST page.

Refs OWASP#89

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Converts dast_scanning.png (scanner sends a SQL payload, target returns a
SQL error) into a Mermaid sequence diagram on the current-version DAST page.

Refs OWASP#89

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Converts iast_analysis.png (external request -> target app -> in-process IAST
agent -> IAST console) into a Mermaid flowchart on the current-version IAST page.

Refs OWASP#89

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Converts Pipeline-view.png into a Mermaid flowchart on the current-version
Overview page: application and infrastructure CI/CD pipelines, the gates
between them, deployments to staging/production, continuous scanning of the
registry and environments, and all findings flowing to central vulnerability
management. Vendor logos are replaced by vendor-neutral stage names.

Refs OWASP#89

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 16, 2026 11:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The published site lacks Mermaid rendering configuration, leaving all five diagrams displayed as source code.

3 open findings
What changed in this PR

Adds five Mermaid diagrams to the current guidelines, advancing issue #89’s diagram-as-code goal while preserving legacy PNGs.

Changes:

  • Illustrates pre-commit, SAST, DAST, and IAST workflows.
  • Adds a vendor-neutral pipeline overview showing security gates and centralized findings.
File Description
current-version/​2-Process/​2-4-Test/​2-4-2-Dynamic-Application-Security-Testing.md Adds a DAST request-response diagram.
current-version/​2-Process/​2-4-Test/​2-4-1-Interactive-Application-Security-Testing.md Illustrates IAST agent reporting.
current-version/​2-Process/​2-3-Build/​2-3-1-Static-Analysis/​2-3-1-1-Static-Application-Security-Testing.md Adds a static-analysis sequence.
current-version/​2-Process/​2-2-Develop/​2-2-1-Pre-commit/​2-2-1-1-Pre-commit.md Shows pre-commit checks and retry flow.
current-version/​0-Intro/​0-2-Overview.md Maps application and infrastructure security pipelines.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread current-version/0-Intro/0-2-Overview.md
Comment thread current-version/2-Process/2-2-Develop/2-2-1-Pre-commit/2-2-1-1-Pre-commit.md Outdated
Comment thread current-version/2-Process/2-4-Test/2-4-2-Dynamic-Application-Security-Testing.md Outdated
farhanashrafdev and others added 4 commits October 16, 2026 16:52
Register a mermaid custom fence in pymdownx.superfences so MkDocs Material
renders the new diagram-as-code blocks instead of showing them as source.
Verified with a local mkdocs build: all five pages render SVGs.

Refs OWASP#89

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
White text on the blue and orange nodes was below the 4.5:1 WCAG AA ratio;
default dark text gives 6.4:1 and 6.9:1.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…n point

A SQL error alone does not prove injection; the note now says it suggests
an injection point that needs verification.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
mkdocs.yml now uses the !!python/name tag required by the pymdownx
Mermaid superfence, which the default safe loader rejects. --unsafe
still validates syntax but tolerates custom tags.

Refs OWASP#89

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Only a nonblocking diagram-label clarification remains; prior rendering and documentation concerns are addressed.

0 open findings

3 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Low severity Align diagram labels with risk-based security gate policy

current-version/​0-Intro/​0-2-Overview.md:51

The No vulnerability labels here and on lines 41 and 49 imply that every finding blocks promotion; No issue on line 51 suggests the same. This conflicts with the risk-based gates, baselines, and accepted exceptions described in current-version/2-Process/2-3-Build/2-3-5-Security-Gates.md:11–14. Label these transitions as passing the security policy so the diagram stays consistent with that guidance.

🧠 Review effort: Balanced

This branch has not been deployed

No deployments
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.

2 participants