Skip to content
Connect an agent

Hosted diagrams and plans

Compliance evidence

The Compliance evidence page shows, for each repository and each diagram, whether your diagrams are current with the code they are drawn from, maps each diagram to the audit controls it serves as evidence for, and downloads that record for your auditor. It is for the team that owns a SOC 2, PCI DSS, ISO/IEC 27001 or NIST SP 800-53 audit, and the platform team that runs CI.

For
  • GitHub

Plotwork provides evidence for controls. It does not decide whether a control is met: your auditor does. Nothing on the page, in the export or on the badge says a repository or a company meets a framework.

TL;DR

QuestionAnswer
Which plan?Enterprise. On another plan the page says what it needs.
What do I need to set up?Nothing new: the page reads the drift runs the GitHub Action already sends with report-drift: true (the drift dashboard). Without CI, a repository shows as Unknown.
Where is it?The organisation's sidebar, Governance, Compliance evidence. Every member can read it; the owner and admins change it and export.
Which runs count?Only runs on each repository's default branch. Pull request runs stay on the Drift tab.
What are the statuses?Current, Drifted, Stale, Unknown and Unverified (section 2).
Which frameworks?PCI DSS v4.0.1 (1.2.3, 1.2.4), SOC 2 (CC2.1, CC8.1), ISO/IEC 27001:2022 Annex A (5.9, 8.9) and NIST SP 800-53 Rev. 5 (CM-8, PL-2). You choose which to show.
What can I hand an auditor?An evidence report for a framework and a date range, to save as PDF, with its JSON and CSV tables; or a read-only link that ends by itself (section 4.2).
Is there a badge for the README?Yes, off by default, at an address that names no repository and stops working when you turn it off.
What about hand-drawn Mermaid?A scan through the GitHub App lists it as Unverified, with name hints against the code, and Make it verifiable opens a pull request that draws it from the code.
What is stored from my files?Only paths, line numbers, names and counts. Never a file's contents.

1. Turn it on

  1. Report drift from CI in each repository, with report-drift: true on the Action's generate step and a trusted publisher or an organisation key. The GitHub App's Enable sets this up in one pull request.
  2. Open the organisation in the portal and choose Compliance evidence under Governance.
  3. As an owner or admin, choose Settings on the page: the frameworks to show, and the window, in days, after which a diagram with no check is stale (14 by default, from 1 to 90).

Each run on a default branch from then on is kept as evidence. Runs sent before the plan included it are not.

2. The statuses

StatusIconMeans
CurrentA shield with a checkThe latest conclusive check on the default branch found the diagram matches the files it is drawn from, within the window.
DriftedA warning triangleThe latest conclusive check found the files make a different diagram. The page shows what changed (added, removed and changed counts) and since when.
StaleA clockNo conclusive check on the default branch within the window. The page says what the last one found.
UnknownA question markNo check on the default branch at all: the repository has no Plotwork CI, or reports only from pull requests.
UnverifiedA crossed-out eyeA hand-drawn Mermaid diagram with no source it is drawn from (section 6). It never counts as current.

A check that could not make the diagram (an import error, for example) is inconclusive: the diagram keeps its last status and shows "Last check failed". A repository's status is the worst of its diagrams': Drifted, then Stale, then Current; Unknown when none has a check. Unverified diagrams are counted beside it and never change it.

CaseWhat happens
Which branch is the defaultThe branch the run's event names, else the one the GitHub App holds, else main or master. A run on any other branch is not evidence.
You rename the default branchRuns on the new name count from the first run that names it. Until then the diagrams turn Stale after the window.
The repository is archived on GitHubOnce a scan has seen it archived, it keeps its last status and never turns Stale.
A pull request from a forkIt gets no token from GitHub, so it cannot report.
The job fails before it reportsNo check is kept; the diagrams turn Stale after the window.

3. Controls

Each diagram is suggested for the controls its format speaks to, and an owner or admin can add or take off any of them in the diagram's drawer. A change is recorded in the audit log.

FrameworkControlSuggested for
PCI DSS v4.0.11.2.3, accurate network diagramsTerraform, Bicep, ARM, Pulumi, CloudFormation, the CDK, Kubernetes, Helm, Kustomize and Compose
PCI DSS v4.0.11.2.4, accurate data-flow diagramsOpenAPI, AsyncAPI, SQL, Prisma and Drizzle, and hand-drawn Mermaid sequence and ER diagrams
SOC 2CC2.1, relevant, quality informationEvery diagram drawn from infrastructure, interfaces, data stores and catalogues
SOC 2CC8.1, change managementEvery diagram drawn from infrastructure, interfaces, data stores and CI pipelines
ISO/IEC 27001:2022Annex A 5.9, inventory of information and other associated assetsInfrastructure, platforms, data stores, Backstage and Structurizr
ISO/IEC 27001:2022Annex A 8.9, configuration managementInfrastructure, platforms and CI pipelines
NIST SP 800-53 Rev. 5CM-8, system component inventoryInfrastructure, platforms, Backstage and Structurizr
NIST SP 800-53 Rev. 5PL-2, system security and privacy plansInfrastructure, platforms, OpenAPI, AsyncAPI, Backstage and Structurizr

Diagrams of data, folders or git history are suggested for none; map them by hand if your auditor accepts them. At the top of the page one figure says how many diagrams are current, with the five statuses beside it as filters. Under it each framework has a card with its share current, a row per control such as "1.2.4 Data-flow diagrams, 12 of 14", and its last 90 days; choose a card to show only the diagrams mapped to its controls. Unverified diagrams count in the total and never as current. Each control's text, how a diagram serves as evidence for it and where that evidence stops are in the page's tooltip and in the export. The ISO text is paraphrased, since the standard is copyrighted.

4. The evidence export

As an owner or admin, choose Export evidence, pick a framework (or all) and a date range of at most 400 days, and a format. The dialog shows what the pack will hold before you download it.

FormatWhat it is
Report (HTML)The evidence report, one self-contained file. Open to save as PDF opens it in a new tab: choose Print, then Save as PDF. A4 or US Letter.
JSONThe whole pack, for your own tools.
Checks CSVEvery check on a default branch in the range.
Episodes CSVEvery drift episode that overlaps the range.
Diagrams CSVEach diagram with the controls it is mapped to and its status at the end of the range.

The pack holds the controls with their text; each diagram mapped to them with its repository, file and format; every check in the range with its date, commits, result and run link; each drift episode with its start, its resolution and the pull request that resolved it; the organisation's approval decisions in the range, when publish approval is used; the unverified diagrams with their hints; and a methodology that says what "current" means. Consecutive checks of one diagram with the same result on the same UTC day are one row with their count, the first and the last commit.

4.1 The report

The report is laid out as an audit document: a cover with your organisation, the framework's mark, the period, the time it was made and its document ID; a contents page; an executive summary with key figures, the share of diagrams current day by day and a bar per control; a section per control with its text, what Plotwork shows, where that evidence stops and every diagram mapped to it with links to the file, the run and the commit; the drift episodes and what fixed them; the methodology; an integrity section; and the check log as an appendix. Every page carries your organisation, the period, the document ID and "Page X of Y". Statuses are an icon and a word, so it prints in black and white.

To show the report has not been changed, the integrity section prints the SHA-256 of its evidence JSON, which the report offers as a download. Run shasum -a 256 on the file (or Get-FileHash -Algorithm SHA256 in PowerShell) and compare. The document ID is the first twelve characters of the same hash, so a report made again later is a new document.

4.2 Share with an auditor

As an owner or admin, choose Share with auditor, pick a framework and a period, and how long the link lasts: 7, 30 or 90 days. Choose who can open it:

ChoiceWhat the auditor does
Anyone with the linkOpens it.
Anyone with the link and a passwordTypes the password you send them separately. Five wrong ones shut the link for 15 minutes.
Named peopleSigns in to Plotwork with the email address you named; a code is emailed to them, with no password to set.

The link is shown once: copy it then. The auditor sees the same document as the PDF, read-only, with the PDF, JSON and CSV downloads and no part of the portal. The list in the same box shows each link, how often it was opened, and Revoke. Every view is recorded in the audit log as orgs.evidence.share_view, with the auditor's address for a named link; making and revoking one are orgs.evidence.share. Only a hash of the link is kept. If your organisation shares only diagrams labelled Public, it makes no links: export the report and send it instead.

Each download is recorded in the audit log as orgs.evidence.export. The pack holds what is kept: checks follow the organisation's drift history (365 days by default on a contract), and while the organisation is on legal hold nothing is removed. At most 20,000 check rows fit in one pack; past that it says so, and a shorter range gets the rest.

5. The README badge

In a repository's menu, choose Badge, then Turn on. The dialog shows the Markdown once:

Markdown
[![Plotwork diagrams](https://api.plotwork.dev/badges/evidence/<token>.svg)](https://docs.plotwork.dev/compliance-evidence)
QuestionAnswer
What does it show?"diagrams" and current, drifted, stale or unknown. Never the repository, the organisation or a count.
Can someone guess it for a private repository?No. The address is 64 random hexadecimal characters, and Plotwork stores only a hash of it.
How do I stop it?Turn it off, or choose New address. The old address shows "unavailable", like an address that never existed, within five minutes.
How fresh is it?Cached for five minutes by browsers, GitHub's image proxy and the edge.

6. Hand-drawn Mermaid

With the GitHub App linked, an owner or admin chooses Scan for Mermaid in a repository's menu. Plotwork reads the default branch's Markdown and Mermaid files (at most 16) and the files of the sources it detects (at most 12), converts each Mermaid diagram, and compares the names it draws with the names the code declares:

HintMeans
Mentions X, not found in codeThe diagram names something no detected source declares. Generic words such as user or database are left out.
X in code, not in this diagramThe source that matches the diagram best declares something it does not draw.
No source to compare withThe repository has no Terraform, Compose, Kubernetes, SQL, OpenAPI or other format Plotwork reads.

These are hints, not verification: a person names things their own way. Each diagram found is Unverified until it is drawn from a source.

Make it verifiable opens a pull request through the App on a branch named plotwork/verify-<source> that adds the matching source to the repository's plotwork.config.json, with the diagram and picture plotwork generate writes. Your Markdown is not changed: the pull request names the Mermaid block it is meant to replace, so you can put the generated picture in its place. Once the source's first check arrives, the finding shows as superseded. A repository with no plotwork.config.json needs Enable first, which draws every detected source in its setup pull request.

7. Privacy

WhatKept
ChecksThe repository, the diagram's name and path, its format, the result, the change counts, the first and last commit, the run and pull request links, and the times. Never the names of what changed.
Mermaid scansThe file paths and line numbers of the diagrams found, their Mermaid type, the names the hints mention, and counts. Files are read in memory for the request and never stored.
BadgesThe repository and a SHA-256 hash of the address's token.

The privacy policy has the full list and how long each is kept.

8. For auditors

QuestionAnswer
How is "current" decided?CI draws the diagram again from the files it names on every run and compares it, by meaning, with the committed diagram. Only runs on the default branch count.
Did Plotwork inspect the systems?No. Statuses come from what CI reported, and a diagram shows what its files declare. Flows and components outside the code need a person to add them.
Can a pull request pose as the default branch?No. Pull request runs are never evidence, and a trusted publisher pins the repository's GitHub id.
Who decided the mapping?The pack marks each control as suggested by the diagram's format or set by a person, and the audit log records each change.
Are hand-drawn diagrams verified?No. They are listed as Unverified with name hints, which are not verification.

See also

PageWhy
Diagram evidence for auditsKeeping diagrams current between audits, on any plan
The drift dashboardThe runs the page reads
The Plotwork GitHub AppEnable, and the scan for Mermaid
Trusted publishersReporting from CI with no key
Audit logWhere exports, mappings, badges and scans are recorded
Retention and patternsLegal hold, which keeps the record
Privacy policyWhat is stored, and for how long