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:
Add multiple badges in a row:



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:
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: ''
})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 --statusshows 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 owaspto 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