Nightward ships a composite GitHub Action for repository policy checks.
jobs:
nightward:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: JSONbored/nightward@v0.1.11
with:
mode: sarif
output: nightward.sarif
- uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225
with:
sarif_file: nightward.sarifInputs:
mode:scan,policy,sarif, orbadgeconfig: optional.nightward.ymlstrict: fail policy checks on medium or higher findingsoutput: output path for scan JSON or SARIFhome: optional HOME override for fixture scansworkspace: optional repository/workspace path to scan; defaults toGITHUB_WORKSPACEunlesshomeis setinclude-analysis: include offline analysis signals in policy or SARIF modessarif-url: optional SARIF URL included in badge mode
Outputs:
findings-countpolicy-passedoutput
The action runs Nightward locally. It does not upload findings unless your workflow separately uploads artifacts or SARIF.
config and output must be relative paths inside GITHUB_WORKSPACE. The action rejects absolute paths, parent traversal, backslashes, and newline characters before invoking Nightward.
For repository CI, the action defaults to GITHUB_WORKSPACE; pass workspace explicitly when you want to scan a narrower checkout path:
- uses: JSONbored/nightward@v0.1.11
with:
mode: sarif
workspace: ${{ github.workspace }}
include-analysis: "true"
output: nightward.sarifTo publish a small badge JSON artifact alongside SARIF:
- uses: JSONbored/nightward@v0.1.11
with:
mode: badge
workspace: ${{ github.workspace }}
include-analysis: "true"
output: nightward-badge.json
sarif-url: https://github.com/JSONbored/nightward/security/code-scanning?query=tool%3ANightward
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
with:
name: nightward-badge
path: nightward-badge.json