πŸ“‹ Compliance
Embedding Badges

Embedding Badges in Your Projects

Step-by-step guides for adding NAT compliance badges to your README, dashboards, wikis, and CI/CD pipelines.


GitHub README

Add a single badge in Markdown:

![OWASP API Top 10](https://img.shields.io/badge/OWASP%20API%20Top%2010-9%2F10%20passing-brightgreen)

Add multiple badges in a row:

![OWASP API Top 10](https://img.shields.io/badge/OWASP%20API%20Top%2010-9%2F10%20passing-brightgreen)
![PCI-DSS](https://img.shields.io/badge/PCI--DSS-7%2F8%20passing-brightgreen)
![HIPAA](https://img.shields.io/badge/HIPAA-compliant-blue)
![SOC 2](https://img.shields.io/badge/SOC%202-audit%20ready-blue)

Use nat badge --framework owasp --format markdown to generate the exact URL for your latest scan result automatically.


GitLab README

GitLab READMEs use the same Markdown syntax as GitHub:

![OWASP API Top 10](https://img.shields.io/badge/OWASP%20API%20Top%2010-9%2F10%20passing-brightgreen)

Confluence / Wiki

Use an HTML <img> tag in Confluence's HTML macro:

<img src="https://img.shields.io/badge/OWASP%20API%20Top%2010-9%2F10%20passing-brightgreen" alt="OWASP API Top 10" />

In Confluence: Insert β†’ HTML macro β†’ paste the <img> tag.


Dashboard embedding

Use NAT's dynamic badge URLs in monitoring dashboards:

Grafana: Add a Text panel with HTML content enabled:

<img src="https://img.shields.io/badge/OWASP%20API%20Top%2010-9%2F10%20passing-brightgreen" />

Datadog: Add a Note widget with the Markdown badge syntax.

The badge URL updates automatically after each NAT scan β€” no dashboard reconfiguration needed.


CI/CD status checks

Add badges to pull request descriptions automatically using GitHub Actions:

- name: Add compliance badge to PR
  uses: actions/github-script@v7
  with:
    script: |
      github.rest.issues.createComment({
        issue_number: context.issue.number,
        owner: context.repo.owner,
        repo: context.repo.repo,
        body: '![OWASP](https://img.shields.io/badge/OWASP%20API%20Top%2010-9%2F10%20passing-brightgreen)'
      })

Custom badge generation

Customize badge style and label with nat badge:

nat badge --framework owasp --style flat-square --label "API Security"

Available --style values: flat (default), flat-square, for-the-badge, plastic


Troubleshooting

Badge not updating?

  • Check that you've run a scan recently: nat scan --status shows your last scan date
  • Verify your API key has read permissions: nat config check
  • Dynamic badges reflect the most recent completed scan. Scans in progress do not update the badge until they complete.

Badge showing wrong score?

  • Confirm the scan completed without errors: nat scan --scan-id scan_001 --status
  • Re-run nat badge --framework owasp to get the latest URL
⚠️

If you copy a badge URL from a report PDF, it may be a static snapshot URL, not the dynamic URL. Use nat badge to get the live dynamic URL.


In a hurry? See Quick Scans

Was this helpful?