Zum Hauptinhalt springen

GitHub Action

Starte einen Vulnara-Scan aus einem GitHub-Workflow und lass den Job scheitern, wenn ein Befund die gewählte Schwere erreicht.

Workflow zusammenstellen

Wähle deine Optionen und kopiere die Datei nach .github/workflows/. Zugangsdaten bleiben in GitHub-Secrets und -Variablen.

.github/workflows/vulnara.yml
name: Vulnara Scan
on:
  push:
    branches: [main]
  pull_request:

jobs:
  vulnara:
    runs-on: ubuntu-latest
    steps:
      - uses: theorigamicorporation/vulnara-action@v1
        id: vulnara
        with:
          service-account: ${{ vars.VULNARA_SERVICE_ACCOUNT }}
          token: ${{ secrets.VULNARA_TOKEN }}
          tenant: ${{ vars.VULNARA_TENANT }}
          scan-tools: '11111111-2222-3333-4444-555555555555'
          fail-on: critical
      - run: echo "Highest severity ${{ steps.vulnara.outputs.highest-severity }}"
        if: always()

Lege in den Repository-Einstellungen VULNARA_TOKEN als Secret sowie VULNARA_SERVICE_ACCOUNT und VULNARA_TENANT als Variablen an.

Eingaben

NameBeschreibung
service-accountPflichtVulnara service account username.
tokenPflichtVulnara service account token (password). Store it as a GitHub secret.
tenantPflichtVulnara tenant (workspace) id the service account belongs to.
scan-toolsComma-separated scan tool ids to run on the repository. Names are not accepted. List the ids with the scan tools query, from the Vulnara CLI or the GraphQL API. Required unless web-target-id or web-url is set.
branchBranch to scan. Defaults to the branch that triggered the workflow.
repositoryowner/name of the repository to scan in Vulnara. Defaults to the current GitHub repository.
git-token-idVulnara git token id to use for cloning (required for private repositories).
fail-onFail the job if a finding at or above this severity is found: none | low | medium | high | critical.Standard: critical
fail-on-exploitedAlso fail the job on actively exploited findings in this run: none | kev (CVE in the CISA Known Exploited Vulnerabilities catalogue) | likely (KEV, or an EPSS score at or above epss-threshold). Findings with a recorded triage decision are skipped.Standard: none
epss-thresholdEPSS probability (0 to 1) at or above which fail-on-exploited: likely fails the job.Standard: 0.1
create-issueCreate an issue in the repository for findings.Standard: false
auto-remediateOpen a fix pull request for findings (requires create-issue).Standard: false
wait-timeoutMax seconds to wait for each scan (repository or web application) to finish before failing.Standard: 1800
poll-intervalSeconds between scan status checks.Standard: 15
web-target-idId of an existing Vulnara web target to run a web application scan on, e.g. after deploying a preview. Its findings feed the same fail-on gate. Mutually exclusive with web-url.
web-urlBase URL of a web application to scan. The web target registered for it is reused, or the URL is registered as a new web target. Requires web-ownership-consent: true. Mutually exclusive with web-target-id.
app-urlVulnara web app base URL, used to build links to scans in the platform.Standard: https://vulnara.rso.dev
gateway-urlVulnara GraphQL API URL.Standard: https://vulnara-gw.rso.dev/graphql
token-urlOAuth token endpoint.Standard: https://auth.theorigamicorporation.com/application/o/token/
oauth-client-idOAuth client id used for the service-account token exchange.Standard: hl04e6MSMRY60LdpGh5rdMRQjkPxvldAYoqXdzo4

Ausgaben

NameBeschreibung
scan-result-idsSpace-separated ids of the scan results that were started.
highest-severityThe highest finding severity discovered across the scans (or "none").
passed"true" if the scans passed the fail-on and fail-on-exploited gates, "false" otherwise.
exploited-countActively exploited findings in this run that fail-on-exploited counts (0 when it is none).
kev-countHow many of those are in the CISA KEV catalogue.
web-target-idId of the web target that was scanned, when a web application scan ran.
web-scan-result-idId of the web application scan result, when one ran.