Vai al contenuto principale

GitHub Action

Avvia una scansione Vulnara da un workflow GitHub e fai fallire il job quando un finding raggiunge la gravità che hai scelto.

Crea il tuo workflow

Scegli le opzioni e copia il file in .github/workflows/. Le credenziali restano nei secret e nelle variabili di GitHub.

.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()

Nelle impostazioni del repository aggiungi VULNARA_TOKEN come secret, e VULNARA_SERVICE_ACCOUNT e VULNARA_TENANT come variabili.

Input

NomeDescrizione
service-accountObbligatorioVulnara service account username.
tokenObbligatorioVulnara service account token (password). Store it as a GitHub secret.
tenantObbligatorioVulnara 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 `vulnara docker_scan_tools` (vulnara-cli) or the GraphQL query `dockerScanTools { id categories }`. 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.Predefinito: 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.Predefinito: none
epss-thresholdEPSS probability (0 to 1) at or above which fail-on-exploited: likely fails the job.Predefinito: 0.1
create-issueCreate an issue in the repository for findings.Predefinito: false
auto-remediateOpen a fix pull request for findings (requires create-issue).Predefinito: false
wait-timeoutMax seconds to wait for each scan (repository or web application) to finish before failing.Predefinito: 1800
poll-intervalSeconds between scan status checks.Predefinito: 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.Predefinito: https://vulnara.rso.dev
gateway-urlVulnara GraphQL API URL.Predefinito: https://vulnara-gw.rso.dev/graphql
token-urlOAuth token endpoint.Predefinito: https://auth.theorigamicorporation.com/application/o/token/
oauth-client-idOAuth client id used for the service-account token exchange.Predefinito: hl04e6MSMRY60LdpGh5rdMRQjkPxvldAYoqXdzo4

Output

NomeDescrizione
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.