Skip to content

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 15:17
· 186 commits to main since this release
9e8ceee

sisakulint v0.4.0

日本語版はこのページの後半(「sisakulint v0.4.0(日本語)」)にあります。

v0.4.0 is the first release of the v1 linter, a rewrite of sisakulint. ("v1" is the name of the implementation, not a version number.) The flags, the exit codes, the output, the rule IDs, and the configuration file are not compatible with v0.3.8 and earlier, and no compatibility wrapper exists. Some flags keep their 0.x name but have a different meaning, so a CI script in which only the flag names are copied still runs, but gives different results.

Important

Read MIGRATION.md before you upgrade a CI script, a Homebrew installation, or gh-intel/sisakulint-action. The sections below summarize it.

Highlights

  • A new analysis engine with no third-party Go modules. The v1 linter reads YAML with its own lossless YAML 1.2.2 syntax tree, reads ${{ }} expressions with an expression parser, and reads run scripts with a bash and sh parser. go.mod has no require line, and the binary links only the Go standard library.
  • 35 security rules and 13 quality rules. Each security rule declares its threat: the attackers, the events, what the attackers gain, the preconditions (with citations of GitHub documentation and observations), and reported incidents. --explain prints the declaration.
  • Severity from CVSS v4.0. Each of the 78 finding kinds has a CVSS v4.0 vector, with a reason for each metric. The severity of a finding kind is derived from the vector by a fixed table of impact and likelihood.
  • Three certainties. A Finding is confirmed, conditional (it depends on a fact that has no answer), or inconclusive (the rule could not decide the place). Each certainty sets its own bit of the exit code.
  • Offline by default, facts on request. A run uses no network unless --online is given. Facts about the repository and about other repositories (whether the repository is public, the commit of a tag, the advisories of an action, and so on) come from --online, a facts file, or --fact. With --online, the rules also read composite actions (to depth 4) and reusable workflows (to depth 3) of other repositories.
  • A gate for pull requests. --remote OWNER/REPO --pull-request N --pull-request-head SHA reads the head of a pull request through the GitHub API without a clone, and reports only the inputs that the pull request changed.
  • Fixes with stated side effects. 14 fix kinds in 12 rules. --fix applies the 2 safe kinds, --fix=review applies all kinds, and --dry-run writes a diff for git apply.
  • An HTML report view. --html FILE and --serve draw the path of the evidence of each Finding. --examples --serve serves a catalog of the examples of every rule.
  • SARIF for code scanning, with one SARIF rule for each finding kind, levels from the severity, and fingerprints that do not depend on line numbers.

Before you upgrade (breaking changes)

Installation and module path

The organization sisaku-security was renamed to gh-intel, and the module path changed.

0.x (v0.3.8 and earlier) v0.4.0 and later
Module path github.com/sisaku-security/sisakulint github.com/gh-intel/sisakulint
go install go install github.com/sisaku-security/sisakulint/cmd/sisakulint@v0.3.8 go install github.com/gh-intel/sisakulint/cmd/sisakulint@v0.4.0
  • go install github.com/gh-intel/sisakulint/cmd/sisakulint@v0.3.8 fails, because the 0.x versions declare the 0.x module path. To keep 0.x, use the 0.x path.
  • To build from source, Go 1.26.11 is required.
  • The command name, the command package (cmd/sisakulint), and the SARIF tool name (sisakulint) are the same as in 0.x.
  • Homebrew: the tap distributes v0.4.0 and later, so brew upgrade replaces 0.x with the v1 linter. Rewrite your scripts before the upgrade.
  • gh-intel/sisakulint-action: do not set the input version to 0.4.0 or later with the current action. The action at 604b94b installs 0.3.0 by default, and always passes -fix "$SISAKULINT_AUTOFIX" and -format '{{sarif .}}'. With the v1 linter, these flags stop the run with exit code 64 or 66. The gate of the action also infers a severity from the end of the ruleId (-critical, and so on) and from words in the message, and the v1 linter writes neither. On the SARIF of the all-rules example, 233 of 237 results became low, so the default fail-on: high passes most results silently. Use v0.4.0 with the action only after a version of the action passes the flags of the v1 linter and reads its severity.

Exit codes

0.x returned 0 (no finding), 1 (findings), 2 (flag error), or 3 (fatal error). When the v1 linter has written the Report and has done everything that was requested, it returns the sum of these bits:

Bit Set when
1 A confirmed Finding at or above --fail-on exists
2 A conditional Finding at or above --fail-on exists, or no input remains after the excluded inputs are removed
4 An internal error occurred
8 An inconclusive Finding of a rule at or above --fail-on exists, and --accept does not accept it
16 An input, or an input that an input calls (uses: ./x), cannot be read or is invalid

Any other result is exactly one of these codes. With 64, 66, and 75, nothing is written to stdout.

Code Meaning
64 Usage error (2 in 0.x)
66 An input, a facts file, an acceptance file, or a configuration file cannot be read or is invalid, or the repository, commit, or pull request of --remote cannot be read
70 Not all fixes can be written
74 An output file (Report, SARIF, facts) cannot be written
75 The head of the pull request is not the value of --pull-request-head

What to check in a CI gate:

  • A gate that fails on every non-zero exit code works without change. It fails in more runs than with 0.x, because of bits 2 and 8.
  • Exit codes 2 and 3 no longer mean a flag error or a fatal error. They mean bit 2, and bits 1 and 2.
  • A script that checks only code & 1 passes silently on a conditional Finding. If you map the exit code to 0 or 1, return 1 when any of bits 1, 2, 8, and 16 is set. Do not map bit 4, 64, 66, 70, 74, or 75 to 0.
  • --fail-on SEVERITY (info, low, medium, high, critical) is the lowest severity that sets bits 1, 2, and 8.
  • Findings of quality rules set no bit.

Flags that keep a 0.x name but have a different meaning

0.x Behavior in v0.4.0 Use instead
-fix on, -fix off, -fix dry-run --fix takes no separate value. on is read as a PATH that does not exist, and the run stops with exit code 66 (-fix=on gives 64) --fix (safe fixes), --fix=review (all fixes), --fix --dry-run (a diff on stdout). For off, pass no --fix
-verbose The same as --detail full. No progress log is written Read inputs[] and errors[] of the Report (--format json)
-init Writes a template to stdout and creates no file --init > FILE
-remote QUERY Reads only one repository. A search query (org:…) gives exit code 64 No replacement

Removed flags

A removed flag prints flag provided but not defined: -NAME and the usage to stderr, and the run stops with exit code 64.

0.x v0.4.0
-ignore REGEX --skip-rule ID[,ID…]. An exact rule ID, not a regular expression. The skipped rule does not run (0.x ran the rule and discarded its findings)
-enable-rule NAME --rule ID[,ID…] runs only the named rules. To add one rule to the default rules, list every ID
-format TEMPLATE --format text|line|json|sarif. Apply jq to the JSON Report instead of a Go template
-config-file FILE --config FILE
-github-token TOKEN The environment variable GITHUB_TOKEN only
-pr N --remote OWNER/REPO --pull-request N
-expected-head-sha SHA --pull-request-head SHA (exit code 75 instead of 3)
-remote-checkout-dir DIR --write-snapshot DIR
-remote-target PATH A positional PATH
-r, -D --online reads the reusable workflows and actions of other repositories
-stdin-filename, -generate-action-list, -boilerplate, -debug, -l, -p None

Inputs

  • The v1 linter does not search the ancestor directories for the repository root. The root is --root (default .). A run in a subdirectory of the repository finds no input and sets bit 2.
  • Only the .yml and .yaml files directly under .github/workflows are workflows. GitHub does not run a file in a lower directory as a workflow. Every action.yml of the repository (or action.yaml when no action.yml exists) is also an input.
  • A PATH argument reads only that file. To read the whole repository and report only the places related to PATH, use --read-all PATH….

Configuration file

  • The v1 linter does not look for .github/sisakulint.yaml. It reads a configuration file only when --config FILE is given. When you lint the repository of another person with --root, a file in that repository must not remove rules.

  • The keys are exclude, fail-on, rule, skip-rule, accept, facts, repo, fact, add-attacker, and no-assumptions. Each key works in the same way as the flag of the same name.

  • To migrate a 0.x file, run this at the repository root, read the output, and commit it:

    sisakulint --init --legacy-configuration .github/sisakulint.yaml --root . > .github/sisakulint-config.yaml

    action-list becomes the fact repo.action-list, and config-variables becomes repo.configuration-variables. secret-exfiltration.allowed-hosts and the workflow directive # sisakulint:secret-exfiltration.allowed-hosts: … become request.destination-trusted, one entry for each pair of a secret and a destination that a current workflow sends the secret to. 0.x allowed a destination by host, so after the migration a Finding appears when a workflow sends a different secret to the same host. self-hosted-runner.labels is not migrated. Each entry that is not migrated is written as a comment in the output and as a line on stderr.

GitHub API and token

  • 0.x always called the GitHub API. The v1 linter calls it only with --online.
  • The token is read only from GITHUB_TOKEN. SISAKULINT_GITHUB_TOKEN, GH_TOKEN, gh auth token, and Git credential helpers are not used. On a local machine, run GITHUB_TOKEN=$(gh auth token) sisakulint ….
  • Facts about the repository itself (whether it is public, whether the default token can write, and so on) are asked only when --repo OWNER/NAME is given. The name is not inferred from the environment or from git. In CI, pass --repo "$GITHUB_REPOSITORY".
  • In 0.x, a step whose API call failed passed without a finding. In v0.4.0, a Finding that depends on a fact without an answer is conditional and sets bit 2.

Output, SARIF, and reviewdog

  • The default --format text is a summary grouped by finding kind. For one line per finding, use --format line (path:line:column: severity kind: message).
  • Go templates are gone. --format json writes the Report (schema sisakulint/report/v0). The Report has the Condition, Inconclusive, and Fix of each finding, which a 0.x template could not write.
  • The severity is a field of a Finding. It is not written in the message or in the rule ID.
  • reviewdog: rewrite sisakulint -format "{{sarif .}}" | reviewdog -f=sarif … to sisakulint --format sarif | reviewdog -f=sarif ….
  • Code scanning: the ruleId is now <rule>.<kind> (for example code-injection.controlled), and the fingerprint differs from 0.x. The SARIF tool name is still sisakulint, so an upload with the same category as 0.x overwrites the 0.x results. MIGRATION.md expects, without verification, that the 0.x alerts close and that the v1 findings open as new alerts. To keep the 0.x alerts open for comparison, upload with a different category input of github/codeql-action/upload-sarif.

Rule IDs and the rules that run

  • Each pair of -critical and -medium rules of 0.x became one ID, and the Finding holds the severity (for example, code-injection-critical and code-injection-medium became code-injection).

  • Other renames and merges:

    0.x v0.4.0
    cache-poisoning-poisonable-step untrusted-checkout
    improper-access-control untrusted-checkout, untrusted-checkout-toctou
    untrusted-checkout-toctou/critical, /high untrusted-checkout-toctou
    reusable-workflow-taint code-injection, envvar-injection, output-clobbering, envpath-injection
    ref-confusion commit-sha
    obfuscation uses-path (quality rule; the uses path part of obfuscation)
    deprecated-commands unsecure-commands (an attacker value in set-env or add-path) and deprecated-commands (quality rule)
    expression a model Diagnostic, and expression (quality rule)
  • syntax, needs, id, and workflow-call are model Diagnostics now, not rules. A model Diagnostic reports a form that GitHub rejects when GitHub reads the workflow. --skip-rule cannot exclude it, the input becomes invalid, and bit 16 is set.

  • dependabot-ecosystem was removed.

  • These rules became quality rules, whose findings set no bit of the exit code: missing-timeout-minutes, archived-uses, deprecated-node-runtime, cache-bloat, dependabot-github-actions, dependency-review-settings, env-var, cond, uses-path, and parts of expression and deprecated-commands. The findings are in quality_findings of the Report. Do not use them as a CI gate.

  • Rules that need facts do not run in a default offline run:

    • known-vulnerable-actions, impostor-commit, archived-uses, and deprecated-node-runtime run with --online, with a facts file or --fact that answers the fact they need, or when --rule names them. 0.x always called the API for them.
    • action-list runs only when a facts file or --fact (also the facts and fact keys of the configuration file) answers repo.action-list, or when --rule names it. --online alone does not run it.
    • missing-timeout-minutes runs only when --rule names it, as in 0.x.

Fixes

v0.4.0 has 14 fix kinds in 12 rules (see "Fixes" under "What's new"). These rules had an auto-fixer in 0.x and have no fix in v0.4.0: missing-timeout-minutes, credentials, permissions, dangerous-triggers, secrets-inherit, secret-exposure, secret-in-log, unmasked-secret-exposure, secrets-in-artifacts, argument-injection, request-forgery, envpath-injection, impostor-commit, cache-bloat, cond, uses-path (0.x obfuscation), and dependabot-github-actions.

--fix without a value applies only the safe fixes. A fix that needs a fact (for example, the commit SHA of a tag) is produced only when the fact is answered before the run (--online, --facts, --fact). In 0.x, the fix of commit-sha called the API during the fix and stopped with exit code 3 on a rate limit.

Detection differences on the same workflows

0.x and the v1 linter were run on the Example inputs of all rules on 2026-11-15. These are not the workflows of users, so the differences on your workflows can be different. The large groups of findings that only 0.x reports:

  • missing-timeout-minutes on steps and on jobs that call a reusable workflow. The v1 linter reports only a job that has runs-on; the timeout-minutes of the job applies to its steps.
  • artipacked on a checkout without an upload. The v1 linter reports only a form in which credentials enter an artifact.
  • deprecated-node-runtime from an embedded table of Node.js versions. The v1 linter asks the fact action.runs-using, and does not run without an answer. For a local action (uses: ./x), it reports runs.using in x/action.yml, not the step.
  • One harm reported many times. 0.x reported cache-poisoning-poisonable-step for each later step that runs the code of the pull request. The v1 linter reports one Finding for each harm, and holds the later steps in Evidence or Related.

What's new

Rules

35 security rules, grouped by the kind of flaw (weakness in --explain). The severity of a rule is the worst severity of its finding kinds.

Weakness Rules (severity)
Script injection code-injection (critical)
Argument injection argument-injection (critical)
Environment file injection envvar-injection (critical), output-clobbering (critical), envpath-injection (high)
Workflow command injection set-output-injection (critical) new, unsecure-commands (critical) new
Request forgery request-forgery (critical)
Untrusted code execution untrusted-checkout (critical), artifact-poisoning (critical), untrusted-checkout-toctou (medium), self-hosted-runner (high)
Gate bypass bot-conditions (critical), unsound-contains (critical)
AI agent hijack ai-action-excessive-tools (critical), ai-action-execution-order (high), ai-action-prompt-injection (high), ai-action-unrestricted-trigger (high), ai-action-unsafe-sandbox (high)
Untrusted reference known-vulnerable-actions (critical), commit-sha (high), impostor-commit (high), action-list (high), unpinned-images (high)
Credential leak artipacked (critical), credentials (critical), secret-in-log (critical), secrets-in-artifacts (critical), unmasked-secret-exposure (critical), secret-exfiltration (medium)
Excessive privilege cache-poisoning (high), dangerous-triggers (high), permissions (high), secret-exposure (high), secrets-inherit (high)

The 78 finding kinds are 31 critical, 42 high, 3 medium, and 2 low.

New security rules:

  • set-output-injection: a step that has an id prints a value of the attacker (the title of an issue, a commit message, and so on) to the log. Regardless of ACTIONS_ALLOW_UNSECURE_COMMANDS, the runner reads ##[set-output name=…;] in a log line, and ::set-output at the start of a line, as a command, and writes an output of the step.
  • unsecure-commands: in a step where ACTIONS_ALLOW_UNSECURE_COMMANDS is true, a value of the attacker is printed to the log, and the runner reads it as set-env or add-path. The attacker writes the env and the PATH of later steps.

13 quality rules: allowed-actions, archived-uses, cache-bloat, cond, dependabot-github-actions, dependency-review-settings, deprecated-commands, deprecated-node-runtime, env-var, expression, missing-timeout-minutes, unset-configuration-variable, uses-path. A quality finding alone gives an attacker nothing. A quality rule has no threat, no CVSS, and no severity.

New quality rules:

  • allowed-actions: a uses names an action, a reusable workflow, or an image that the allowed-actions setting of the repository does not permit (the fact repo.allowed-actions), or the setting requires a full commit SHA and the uses names a tag or a branch. GitHub does not start the run, or fails the job in Set up job.
  • unset-configuration-variable: a ${{ }} reads vars.<name>, and no level (repository, organization, environment) defines the variable. GitHub makes the value an empty string, and fromJSON of it fails.
  • uses-path: a uses path has an empty element, ., .., or \, or goes above the root of the repository or of the workspace. GitHub does not read it as written. This replaces the uses part of 0.x obfuscation.

A threat model in every rule

  • --explain ID and --explain=all print each rule as Markdown: the problem, the expected state, the threat (preconditions with citations and observations, attackers, events, gains, incidents with advisories and CVEs), the finding kinds, the fix kinds with their side effects, the undetected forms, the inconclusive kinds, the false positive forms, and the examples.
  • --explain=terms defines the item names and values.
  • --registry writes the same declarations as JSON (sisakulint/registry/v0), and --registry=full adds the fact answers of each example. Read this JSON in programs; the Markdown of --explain may change.
  • Severity: each finding kind has CVSS v4.0 Base metrics and Exploit Maturity (E), with a reason for each value. The impact is the highest of VC, VI, VA, SC, SI, and SA. The likelihood comes from AV, AT, and PR, and AC:H or UI:A lowers it one step. A table maps impact and likelihood to the severity (for example, impact H with high likelihood is critical). --explain also prints CVSS-B and CVSS-BT from a port of the FIRST reference calculator, for reference.

Certainty, assumptions, and attackers

  • confirmed sets bit 1. conditional (the Finding depends on a fact that has no answer; the Report names the fact) sets bit 2. inconclusive (a place where the rule cannot decide, such as a value that the rule does not read) sets bit 8.
  • When no source answers a fact, the run uses an assumed value (the worst case) and prints it, for example assumed: repo.default-token-write = true. --no-assumptions treats those facts as unknown instead.
  • A default run counts only attacks by outside people. --add-attacker VALUE also runs the rules with one added attacker: read-member, triage-account, writer-pull-requests-token, writer-issues-token, required-reviewer, app-installation-token, variables-writer, or secrets-writer. A Finding that appears only with the added attacker is marked (added_attackers in the Report, added attacker: in the text output, properties.added_attackers in SARIF). Which approval, gate, or if each value passes comes from the tables of actions/boundary, and each row has evidence. --add-attacker cannot be used with --fix.

Facts

  • --online asks the GitHub API (token: GITHUB_TOKEN). --github-api URL sets the API root for GitHub Enterprise Server.
  • --facts FILE reads answers from a file, and --write-facts FILE writes the facts that the run asked and their answers. A CI without a network can run with a facts file written on another machine.
  • --fact KIND=VALUE or --fact 'KIND[ARG=VALUE,…]=VALUE' answers one fact (the value is JSON). The order of precedence is --fact, then the facts file, then the API.
  • 29 fact kinds exist, for example repo.public, repo.default-token-write, repo.environment-protected, repo.fork-pr-secrets, git.ref-commit, git.commit-ref, package.advisories, action.definition, workflow.definition, and request.destination-trusted. --explain=terms lists all of them and how --online answers each.
  • Actions and reusable workflows of other repositories: with --online (or a facts file that has the answers), the run reads a composite action and the steps inside it to depth 4 (action.definition), and a reusable workflow and its jobs to depth 3 (workflow.definition). A Finding inside appears at the uses of the caller, with the location inside at the start of the Evidence, and has no Fix. An action is read from the archive that the runner fetches, and a reusable workflow from the blob of the commit. When something cannot be answered (a private repository, a size or request limit, beyond the depth), the place becomes Inconclusive (remote-unknown, remote-callee-unknown), which sets bit 8.
  • pull_request_target policy: GitHub's default policy that stops pull_request_target in public repositories is enforced on 2026-12-02. For a workflow that the policy stops, answer --fact 'repo.pull-request-target-allowed[input_path=.github/workflows/<file>]=false', and the findings whose only attacker event is pull_request_target are no longer reported. The API is not asked for this fact. Without an answer, the rules assume that the run starts.
  • .github/dependabot.yml and the Renovate configuration are read as facts from the files under --root.

Warning

A facts file written by --write-facts contains the content of the actions and reusable workflows that were read, including those of private repositories.

Remote repositories and pull requests

  • --remote reads a GitHub repository instead of --root: OWNER/REPO, OWNER/REPO@REF (branch, tag, or commit SHA), or a URL (https://github.com/OWNER/REPO, …/tree/<ref>, …/pull/<N>). The ref is resolved to a commit first, and only that commit is read, file by file, through the git tree and blob APIs. Nothing is cloned or written to disk. remote_revision of the Report lists the repository, ref, commit, tree, and each file read with its blob SHA.
  • Limits: 1000 requests per run and 1 MiB per file (an input over a limit becomes unreadable and sets bit 16). A tree with more than 100,000 entries, a rate limit, or a network error stops the run with exit code 66. Without a token, the API allows 60 requests per hour, and one file costs one request.
  • --pull-request N reads the head of the pull request (also from a fork) and reports only the inputs that the pull request changed, computed from the trees of the merge base and the head. A changed symlink target and a changed submodule commit called with uses: ./ count as changes. When the pull request changes a file that is read but is not an input (.github/dependabot.yml, the labeler configuration), all inputs are reported.
  • --pull-request-head SHA stops the run with exit code 75 when the head of the pull request is not that SHA. Pass it when you attach the result to a commit, for example as a status check.
  • remote_revision.pull_request.behind_by shows how far the base moved ahead of the merge base. When the moved part touches an input or a file that was read, bit 16 is set.
  • --write-snapshot DIR writes the files that were read to a new directory, and with --fix fixes the files there.
  • README.md lists what to check before you use this as a gate: a strict branch protection or a merge queue, a gate that runs outside the workflows that the pull request can change, and the limits of --accept.

Fixes

Rule Fix kind Safety What it does
commit-sha pin-sha safe Pins the ref to the full SHA of the commit that the runner runs for it now
untrusted-checkout-toctou pin-head-sha safe Checks out github.event.pull_request.head.sha, the commit that the approval saw, instead of a branch or refs/pull/<n>/head
untrusted-checkout-toctou pin-head-sha-review review Checks out the head that the approval saw instead of refs/pull/<n>/merge
code-injection env-var review Moves the expressions into the env of the step, and reads the variables, quoted as the shell needs (bash and sh)
code-injection, envvar-injection, output-clobbering env-var-review review Moves the expressions into env and reads them as "${NAME}" (bash, sh), $env:NAME (pwsh), or process.env.NAME (github-script); removes line breaks from what is written to $GITHUB_ENV or $GITHUB_OUTPUT, or makes the name<<DELIM delimiter random
untrusted-checkout base-checkout review Checks out the code of the base (removes the inputs that name the pull request)
artifact-poisoning runner-temp-path review Downloads the artifact to ${{ runner.temp }}/artifacts, outside the workspace
artipacked persist-credentials-false review persist-credentials: false on the checkout
bot-conditions author-context review Compares github.event.pull_request.user.login instead of the actor
cache-poisoning cache-mode-no-write review Saves nothing to the cache on the events of the attacker
known-vulnerable-actions upgrade-version review For a uses pinned to a full SHA: pins it to the commit of the first version that fixes every advisory found, and names the version in the comment at the end of the line
unsound-contains contains-array review contains(fromJSON('[...]'), x): compares whole values
unsound-contains equality review contains(x, 'value') becomes x == 'value'
  • --fix applies the safe kinds, --fix=review applies all kinds, and --dry-run writes a diff that git apply accepts instead of writing the files.
  • The side effects of a review fix (changes other than the removal of the Finding) are printed under the fix line of the text output and in fix.side_effects of the Report.
  • --fix checks the result with the rules that ran. A Fix that changes the certainty or the condition of another Finding is an error. When an applied Fix changes something that a skipped rule reads, the rule is reported as not checked:.
$ sisakulint --root . --fix=review --dry-run
diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml
--- a/.github/workflows/triage.yml
+++ b/.github/workflows/triage.yml
@@ -6,4 +6,6 @@
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
-      - run: echo "${{ github.event.issue.title }}"
+      - run: echo "${ISSUE_TITLE}"
+        env:
+          ISSUE_TITLE: ${{ github.event.issue.title }}

Output

The default text output, for a workflow on issues that writes ${{ github.event.issue.title }} in run (some lines omitted):

$ sisakulint --root .
critical  code-injection.controlled  .github/workflows/triage.yml:9:24
  github.event.issue.title is written into the run script by ${{ }}, and an attacker controls it on issues
  impact: the value becomes code
    9 |       - run: echo "${{ github.event.issue.title }}"
      |                        ^^^^^^^^^^^^^^^^^^^^^^^^
  remedy: pass it through env and read the variable
  fix (review): move the expressions into the env of the step, and read the variables where they were, quoted as the shell needs (bash and sh)  [--fix=review]

high  dangerous-triggers.token-write  .github/workflows/triage.yml:6:5
  the job runs on issues, which an attacker triggers, with no approval and a GITHUB_TOKEN that may write
  ...
  assumed: repo.default-token-write = true (--no-assumptions to drop)

high  commit-sha.unpinned  .github/workflows/triage.yml:8:32
  actions/checkout@v4 is not pinned to a full commit SHA
  ...
  no fix: the commit of the ref is not known (offline: pass --facts or --online)

quality
  dependabot-github-actions.no-update-tool
    .github/workflows/triage.yml:8:32  no update tool updates actions/checkout@v4 ...

inputs  1 read  (every workflow and action.yml under --root)
...
not run  known-vulnerable-actions: ... in a run without --rule, the rule runs when --online is given, ...
4 findings: 4 confirmed (critical 1, high 3), 0 conditional, 0 inconclusive
1 quality finding: the bits do not count quality findings
bits 1 = 1 (confirmed findings)
  • --format text (default), line, json, or sarif. --detail summary|normal|full (-v is full), and --color auto|always|never (auto respects NO_COLOR).
  • --report FILE writes the JSON Report and --sarif FILE writes SARIF, in addition to the stdout output.
  • The Report has findings[] (with certainty, condition, evidence, related places, fix, and fingerprint), quality_findings, inputs[], errors[], skipped_rules, reported_inputs, and remote_revision.
  • --version prints the version, the commit, the Go version and platform, and the JSON schemas that the binary writes and reads.

SARIF and code scanning

  • One SARIF rule (reportingDescriptor) for each finding kind, with the ID <rule>.<kind>. critical and high become error, medium becomes warning, and low and info become note. security-severity is set. A quality finding becomes a note that is not a security alert.
  • An Inconclusive becomes an alert with the tags security and inconclusive. An Inconclusive accepted with --accept is not written. A conditional Finding becomes the same alert as a confirmed one, and the fact without an answer is appended to the message.
  • Related places are written to relatedLocations and linked from the message.
  • partialFingerprints.primaryLocationLineHash comes from the Fingerprint, which has no line number, so a Finding keeps its alert when lines move.
  • File locations are relative URIs with the uriBaseId %SRCROOT%, and the absolute path of the machine that ran the lint is not written.
  • Unreadable inputs and internal errors are written to invocations[0].toolExecutionNotifications.
permissions:
  contents: read
  security-events: write
  actions: read   # needed only in a private repository
steps:
  # after actions/checkout and a step that installs sisakulint
  - run: sisakulint --root . --sarif sisakulint.sarif
  - if: ${{ !cancelled() }}
    uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
    with:
      sarif_file: sisakulint.sarif

HTML report view and example catalog

  • --html FILE writes, and --serve serves on 127.0.0.1 (--serve=ADDR for another loopback address), a page that draws the path of the Evidence of each Finding, marks the lines of the quality findings, and lets you try the condition of each finding.
  • --examples --serve serves the results of the Example of every rule and quality rule, run with the fact answers of each example (--examples=RULE --html FILE for one rule). The catalog groups rules by weakness or attack means, shows the "boundary" (each gain by role, with the rows of evidence), and links the definitions of --explain=terms.

Warning

The HTML contains lines of the workflows. When you share the HTML of a private repository, those lines leak.

Accepting an Inconclusive

  • When a person has looked at an Inconclusive place and decided that the value is not an attacker value, write the place in an acceptance file (sisakulint/acceptances/v0) with a reason, and pass it with --accept FILE. The place no longer sets bit 8, and it stays in findings[] of the Report with acceptance.reason.
  • An entry matches when six values are equal: the rule, kind_id, the input, key_path, span_text, and span_lines. Line numbers are not used. An empty reason, an unknown rule, or a duplicate entry stops the run with exit code 66. An entry that matches nothing is named on stderr.
  • README.md has a jq command that writes a template from the Report.
  • A pull request can add an acceptance file or change the configuration file. When the lint runs in a workflow that the author of the pull request cannot change, read these files from the base branch or protect them with CODEOWNERS.

Other inputs

  • --stdin-name NAME reads one file from stdin as the path NAME of the repository.
  • --exclude PATH (repeatable) leaves out a path. Excluded action.yml files are listed as excluded. .github/workflows cannot be excluded, because GitHub always runs the workflows there.

Build, packaging, and development

  • Release assets: sisakulint_0.4.0_darwin_amd64.tar.gz, sisakulint_0.4.0_darwin_arm64.tar.gz, sisakulint_0.4.0_linux_amd64.tar.gz, sisakulint_0.4.0_linux_arm64.tar.gz, sisakulint_0.4.0_linux_armv6.tar.gz, and sisakulint_0.4.0_checksums.txt. The binaries are built with CGO_ENABLED=0.
  • Go: go.mod requires Go 1.26.11 (v0.3.8 required Go 1.26.9). In the 0.x line, #670 raised Go to 1.26.10 to fix a govulncheck finding in the standard library.
  • Dependencies: v0.3.8 required go-github, yaml.v3, mvdan.cc/sh, oauth2, fatih/color, go-sarif, and others. v0.4.0 requires no third-party module, and the repository has no go.sum.
  • 32-bit build (#684): the first release run of v0.4.0 failed on linux/arm, because the bound 1<<40 on the exponent of a JSON number overflowed the 32-bit int. The exponent is now int64.
  • Tests: go test ./... skips the 14 slowest tests unless ACTIONS_LONG=1 (#681). Without the race detector, go test ./... took 2 minutes 25 seconds in the measurement of #681 (actions/rules 277 s → 101 s, actions/cli 191 s → 67 s, actions/reportview 137 s → 12 s). CI runs the tests without the race detector (#683). ACTIONS_UPSTREAM=1 (with GH_TOKEN) runs the tests that compare data taken from other projects with those projects, and .github/workflows/upstream-drift.yaml runs them every week. CI also runs govulncheck v1.6.0 and checks gofmt.
  • The package layout is described in CLAUDE.md.

Compatibility from here

The JSON schemas are sisakulint/report/v0, sisakulint/registry/v0, sisakulint/facts/v0, and sisakulint/acceptances/v0 (--version lists them). v0.4.0 does not promise that the JSON schemas and the Go packages stay compatible in later 0.x releases.

Upgrade checklist

  1. Install from the new module path, or pin 0.x with go install github.com/sisaku-security/sisakulint/cmd/sisakulint@v0.3.8. Check Homebrew and sisakulint-action before you upgrade them.
  2. Replace the removed flags and the flags whose meaning changed (-fix on, -format '{{…}}', -ignore, -enable-rule, -config-file, -github-token).
  3. Rewrite the exit-code handling for bits 1, 2, 4, 8, and 16 and for codes 64, 66, 70, 74, and 75.
  4. Rewrite the rule names in --skip-rule and --rule with the table in section 6 of MIGRATION.md.
  5. Move the configuration with --init --legacy-configuration, and pass it with --config.
  6. In CI, set GITHUB_TOKEN in the env of the step, and pass --online --repo "$GITHUB_REPOSITORY" (or a facts file).
  7. Upload SARIF with a new category if you want to compare with the 0.x alerts.
  8. Run once with --format json, and look at the conditional and inconclusive findings. Answer the missing facts, or accept reviewed Inconclusive places with --accept.

Pull requests

  • #670 Bump Go to 1.26.10 to fix a govulncheck standard library finding (@sushant-me)
  • #679 Replace the 0.x implementation with the v1 linter, adapt CI, release, and review settings, and document the migration (@on-keyday)
  • #680 MIGRATION.md: state that v0.4.0 is the first release of the rewritten linter (@on-keyday)
  • #681 Skip the 14 slowest tests by default; run them with ACTIONS_LONG=1 (@on-keyday)
  • #682 Rename the module path to github.com/gh-intel/sisakulint (@on-keyday)
  • #683 Before v0.4.0: remove time-bound statements from the documents, and run CI tests without the race detector (@on-keyday)
  • #684 Fix the build for 32-bit platforms (linux/arm), which failed the v0.4.0 release (@on-keyday)

Full Changelog: v0.3.8...v0.4.0


sisakulint v0.4.0(日本語)

v0.4.0 は、sisakulint を書き直した v1 linter の最初のリリースです(「v1」は実装の名前で、バージョン番号ではありません)。フラグ、exit code、出力、ルール ID、設定ファイルは v0.3.8 以前と互換性がなく、互換レイヤーもありません。0.x と同じ名前のまま意味が変わったフラグがあるため、フラグ名だけを書き写した CI スクリプトはエラーにならずに動き、異なる結果を返します。

Important

CI スクリプト、Homebrew のインストール、gh-intel/sisakulint-action をアップグレードする前に、MIGRATION.md を読んでください。以下の節はその要約です。

ハイライト

  • サードパーティの Go モジュールを使わない新しい解析エンジン。 v1 linter は、独自のロスレスな YAML 1.2.2 構文木で YAML を、式パーサーで ${{ }} 式を、bash と sh のパーサーで run のスクリプトを読みます。go.mod に require 行はなく、バイナリがリンクするのは Go の標準ライブラリだけです。
  • セキュリティルール 35 件と品質ルール 13 件。 各セキュリティルールは脅威を宣言しています。攻撃者、イベント、攻撃者が得るもの、前提条件(GitHub のドキュメントや観測結果の引用付き)、報告されたインシデントです。--explain で宣言を表示できます。
  • CVSS v4.0 に基づく severity。 78 種類の finding kind はそれぞれ CVSS v4.0 ベクトルを持ち、各メトリクスに理由が付いています。finding kind の severity は、impact と likelihood の固定の表によってベクトルから求めます。
  • 3 種類の certainty。 Finding は confirmed、conditional(回答のない fact に依存する)、inconclusive(ルールが判断できなかった箇所)のいずれかです。certainty ごとに exit code の別のビットが立ちます。
  • デフォルトはオフライン、fact は必要なときだけ取得。 --online を付けない限り、ネットワークは使いません。リポジトリ自身や他リポジトリについての fact(リポジトリが public か、タグのコミット、action の advisory など)は、--online、facts ファイル、--fact から得ます。--online を付けると、他リポジトリの composite action(深さ 4 まで)と reusable workflow(深さ 3 まで)の中身もルールが読みます。
  • プルリクエスト用のゲート。 --remote OWNER/REPO --pull-request N --pull-request-head SHA は、clone せずに GitHub API でプルリクエストの head を読み、そのプルリクエストが変更した入力だけを報告します。
  • 副作用を明示した Fix。 12 ルールに 14 種類の fix kind があります。--fix は safe な 2 種類を、--fix=review はすべての種類を適用し、--dry-run は git apply 用の diff を出力します。
  • HTML レポートビュー。 --html FILE と --serve は、各 Finding の evidence の経路を描画します。--examples --serve は全ルールの例のカタログを表示します。
  • code scanning 向けの SARIF。 finding kind ごとに 1 つの SARIF ルールがあり、level は severity から決まり、fingerprint は行番号に依存しません。

アップグレードの前に(破壊的変更)

インストールとモジュールパス

Organization sisaku-security は gh-intel に名前が変わり、モジュールパスも変わりました。

0.x(v0.3.8 以前) v0.4.0 以降
モジュールパス github.com/sisaku-security/sisakulint github.com/gh-intel/sisakulint
go install go install github.com/sisaku-security/sisakulint/cmd/sisakulint@v0.3.8 go install github.com/gh-intel/sisakulint/cmd/sisakulint@v0.4.0
  • 0.x の各バージョンは 0.x のモジュールパスを宣言しているため、go install github.com/gh-intel/sisakulint/cmd/sisakulint@v0.3.8 は失敗します。0.x を使い続ける場合は 0.x のパスを指定してください。
  • ソースからビルドするには Go 1.26.11 が必要です。
  • コマンド名、コマンドのパッケージ(cmd/sisakulint)、SARIF のツール名(sisakulint)は 0.x と同じです。
  • Homebrew: tap は v0.4.0 以降を配布するため、brew upgrade で 0.x が v1 linter に置き換わります。アップグレードの前にスクリプトを書き換えてください。
  • gh-intel/sisakulint-action: 現在の action では、入力 version を 0.4.0 以上にしないでください。604b94b の action はデフォルトで 0.3.0 をインストールし、常に -fix "$SISAKULINT_AUTOFIX" と -format '{{sarif .}}' を渡します。v1 linter はこれらのフラグで exit code 64 または 66 を返して停止します。さらに、action のゲートは ruleId の末尾(-critical など)とメッセージ中の単語から severity を推定しますが、v1 linter はどちらも出力しません。all-rules の例の SARIF では 237 件中 233 件が low と判定され、デフォルトの fail-on: high ではほとんどの結果が黙って通過します。action で v0.4.0 を使うのは、v1 linter のフラグを渡し、その severity を読むバージョンの action が出てからにしてください。

Exit code

0.x は 0(finding なし)、1(finding あり)、2(フラグのエラー)、3(致命的エラー)を返していました。v1 linter は、Report を書き出し、要求されたことをすべて終えた場合、次のビットの合計を返します。

ビット 立つ条件
1 --fail-on 以上の confirmed な Finding がある
2 --fail-on 以上の conditional な Finding がある、または除外後に入力が残っていない
4 内部エラーが起きた
8 --fail-on 以上のルールの inconclusive な Finding があり、--accept で受け入れられていない
16 入力、または入力が呼び出す入力(uses: ./x)を読めない、または不正である

それ以外の結果は、次のいずれか 1 つのコードになります。64、66、75 のときは stdout に何も出力しません。

コード 意味
64 使い方の誤り(0.x の 2)
66 入力、facts ファイル、acceptance ファイル、設定ファイルを読めない・不正である、または --remote のリポジトリ・コミット・プルリクエストを読めない
70 すべての Fix を書き込めなかった
74 出力ファイル(Report、SARIF、facts)を書き込めない
75 プルリクエストの head が --pull-request-head の値と異なる

CI ゲートで確認すること:

  • 0 以外のすべての exit code で失敗するゲートは、そのまま動きます。ビット 2 と 8 があるため、0.x より失敗する実行が増えます。
  • exit code 2 と 3 は、フラグのエラーや致命的エラーを意味しなくなりました。それぞれビット 2、ビット 1 と 2 を意味します。
  • code & 1 だけを見るスクリプトは、conditional な Finding を黙って通します。exit code を 0 か 1 に変換する場合は、ビット 1、2、8、16 のいずれかが立っていれば 1 を返してください。ビット 4 と、64、66、70、74、75 は 0 に変換しないでください。
  • --fail-on SEVERITY(info、low、medium、high、critical)は、ビット 1、2、8 を立てる最低の severity です。
  • 品質ルールの finding はどのビットも立てません。

0.x と同じ名前で意味が変わったフラグ

0.x v0.4.0 での動作 代わりに使うもの
-fix on、-fix off、-fix dry-run --fix は別の引数を値として取らない。on は存在しない PATH として読まれ、exit code 66 で停止する(-fix=on は 64) --fix(safe な Fix)、--fix=review(すべての Fix)、--fix --dry-run(stdout に diff)。off にあたるのは --fix を渡さないこと
-verbose --detail full と同じ。進捗ログは出力しない Report(--format json)の inputs[] と errors[] を読む
-init テンプレートを stdout に出力し、ファイルは作らない --init > FILE
-remote QUERY 読むのは 1 リポジトリだけ。検索クエリ(org:…)は exit code 64 代替なし

削除されたフラグ

削除されたフラグを渡すと、flag provided but not defined: -NAME と使い方を stderr に出力し、exit code 64 で停止します。

0.x v0.4.0
-ignore REGEX --skip-rule ID[,ID…]。正規表現ではなく、ルール ID の完全一致。スキップしたルールは実行されない(0.x はルールを実行してから finding を捨てていた)
-enable-rule NAME --rule ID[,ID…] は指定したルールだけを実行する。デフォルトのルールに 1 つ追加するには、すべての ID を並べる
-format TEMPLATE --format text|line|json|sarif。Go テンプレートの代わりに、JSON の Report に jq を使う
-config-file FILE --config FILE
-github-token TOKEN 環境変数 GITHUB_TOKEN のみ
-pr N --remote OWNER/REPO --pull-request N
-expected-head-sha SHA --pull-request-head SHA(exit code は 3 ではなく 75)
-remote-checkout-dir DIR --write-snapshot DIR
-remote-target PATH 位置引数の PATH
-r、-D --online で他リポジトリの reusable workflow と action を読む
-stdin-filename、-generate-action-list、-boilerplate、-debug、-l、-p なし

入力

  • v1 linter は、リポジトリのルートを祖先ディレクトリにさかのぼって探しません。ルートは --root(デフォルトは .)です。リポジトリのサブディレクトリで実行すると入力が見つからず、ビット 2 が立ちます。
  • workflow として扱うのは、.github/workflows の直下にある .yml と .yaml のファイルだけです。GitHub はそれより下のディレクトリにあるファイルを workflow として実行しません。リポジトリ内のすべての action.yml(action.yml がない場合は action.yaml)も入力になります。
  • PATH 引数を渡すと、そのファイルだけを読みます。リポジトリ全体を読んだうえで PATH に関係する箇所だけを報告するには、--read-all PATH… を使います。

設定ファイル

  • v1 linter は .github/sisakulint.yaml を探しません。設定ファイルを読むのは --config FILE を渡したときだけです。--root で他人のリポジトリを lint するときに、そのリポジトリ内のファイルでルールを外されないようにするためです。

  • キーは exclude、fail-on、rule、skip-rule、accept、facts、repo、fact、add-attacker、no-assumptions です。各キーは同名のフラグと同じように働きます。

  • 0.x のファイルを移行するには、リポジトリのルートで次のコマンドを実行し、出力を読んでからコミットしてください。

    sisakulint --init --legacy-configuration .github/sisakulint.yaml --root . > .github/sisakulint-config.yaml

    action-list は fact repo.action-list に、config-variables は repo.configuration-variables になります。secret-exfiltration.allowed-hosts と workflow のディレクティブ # sisakulint:secret-exfiltration.allowed-hosts: … は request.destination-trusted になり、現在の workflow が secret を送っている「secret と送信先」の組ごとに 1 エントリが作られます。0.x はホスト単位で送信先を許可していたため、移行後に workflow が同じホストへ別の secret を送ると Finding が出ます。self-hosted-runner.labels は移行されません。移行されなかったエントリは、出力中のコメントと stderr の 1 行として出力されます。

GitHub API とトークン

  • 0.x は常に GitHub API を呼び出していました。v1 linter が API を呼ぶのは --online のときだけです。
  • トークンは GITHUB_TOKEN からのみ読みます。SISAKULINT_GITHUB_TOKEN、GH_TOKEN、gh auth token、Git の credential helper は使いません。ローカルでは GITHUB_TOKEN=$(gh auth token) sisakulint … のように実行してください。
  • リポジトリ自身についての fact(public かどうか、デフォルトのトークンが書き込めるかどうかなど)を問い合わせるのは、--repo OWNER/NAME を渡したときだけです。名前を環境変数や git から推測することはしません。CI では --repo "$GITHUB_REPOSITORY" を渡してください。
  • 0.x では、API 呼び出しに失敗したステップは finding なしで通過していました。v0.4.0 では、回答のない fact に依存する Finding は conditional になり、ビット 2 が立ちます。

出力、SARIF、reviewdog

  • デフォルトの --format text は、finding kind ごとにまとめた要約です。finding ごとに 1 行で出力するには --format line(path:line:column: severity kind: message)を使います。
  • Go テンプレートはなくなりました。--format json は Report(スキーマ sisakulint/report/v0)を出力します。Report には、0.x のテンプレートでは出力できなかった各 finding の Condition、Inconclusive、Fix が含まれます。
  • severity は Finding のフィールドです。メッセージやルール ID には書かれません。
  • reviewdog: sisakulint -format "{{sarif .}}" | reviewdog -f=sarif … を sisakulint --format sarif | reviewdog -f=sarif … に書き換えてください。
  • code scanning: ruleId は <rule>.<kind>(例: code-injection.controlled)になり、fingerprint も 0.x とは異なります。SARIF のツール名は sisakulint のままなので、0.x と同じ category でアップロードすると 0.x の結果が上書きされます。MIGRATION.md は、0.x のアラートが閉じられ、v1 の finding が新しいアラートとして開かれると推測しています(未検証)。比較のために 0.x のアラートを開いたままにしたい場合は、github/codeql-action/upload-sarif の入力 category に別の値を指定してアップロードしてください。

ルール ID と実行されるルール

  • 0.x の -critical と -medium の組は 1 つの ID にまとまり、severity は Finding が持ちます(例: code-injection-critical と code-injection-medium は code-injection になりました)。

  • その他の名前の変更と統合:

    0.x v0.4.0
    cache-poisoning-poisonable-step untrusted-checkout
    improper-access-control untrusted-checkout、untrusted-checkout-toctou
    untrusted-checkout-toctou/critical、/high untrusted-checkout-toctou
    reusable-workflow-taint code-injection、envvar-injection、output-clobbering、envpath-injection
    ref-confusion commit-sha
    obfuscation uses-path(品質ルール。obfuscation のうち uses のパスの部分)
    deprecated-commands unsecure-commands(set-env や add-path に攻撃者の値が入るもの)と deprecated-commands(品質ルール)
    expression モデルの Diagnostic と expression(品質ルール)
  • syntax、needs、id、workflow-call は、ルールではなくモデルの Diagnostic になりました。モデルの Diagnostic は、GitHub が workflow を読む時点で拒否する形を報告するものです。--skip-rule では除外できず、その入力は invalid になり、ビット 16 が立ちます。

  • dependabot-ecosystem は削除されました。

  • 次のルールは品質ルールになり、その finding は exit code のビットを立てません: missing-timeout-minutes、archived-uses、deprecated-node-runtime、cache-bloat、dependabot-github-actions、dependency-review-settings、env-var、cond、uses-path、および expression と deprecated-commands の一部。finding は Report の quality_findings に入ります。CI ゲートには使わないでください。

  • fact を必要とするルールは、デフォルトのオフライン実行では動きません。

    • known-vulnerable-actions、impostor-commit、archived-uses、deprecated-node-runtime は、--online を付けたとき、必要な fact に facts ファイルや --fact が回答したとき、または --rule で指定したときに動きます。0.x はこれらのために常に API を呼んでいました。
    • action-list は、facts ファイルや --fact(設定ファイルの facts と fact のキーを含む)が repo.action-list に回答したとき、または --rule で指定したときだけ動きます。--online だけでは動きません。
    • missing-timeout-minutes は、0.x と同じく --rule で指定したときだけ動きます。

Fix

v0.4.0 には、12 ルールに 14 種類の fix kind があります(「新機能」の「Fix」を参照)。次のルールは 0.x では自動修正がありましたが、v0.4.0 には Fix がありません: missing-timeout-minutes、credentials、permissions、dangerous-triggers、secrets-inherit、secret-exposure、secret-in-log、unmasked-secret-exposure、secrets-in-artifacts、argument-injection、request-forgery、envpath-injection、impostor-commit、cache-bloat、cond、uses-path(0.x の obfuscation)、dependabot-github-actions。

値なしの --fix は safe な Fix だけを適用します。fact を必要とする Fix(例: タグのコミット SHA)は、実行前にその fact が回答されている場合(--online、--facts、--fact)にだけ作られます。0.x では、commit-sha の Fix が修正中に API を呼び、レート制限に達すると exit code 3 で停止していました。

同じ workflow での検出結果の違い

2026-11-15 に、全ルールの Example の入力に対して 0.x と v1 linter を実行して比較しました。ユーザーの workflow ではないため、手元の workflow での違いはこれと異なる場合があります。0.x だけが報告する finding の大きなまとまりは次のとおりです。

  • ステップ、および reusable workflow を呼び出す job に対する missing-timeout-minutes。v1 linter は runs-on を持つ job だけを報告します。job の timeout-minutes はそのステップにも適用されるためです。
  • アップロードを伴わない checkout に対する artipacked。v1 linter は、認証情報が artifact に入る形だけを報告します。
  • 組み込みの Node.js バージョン表に基づく deprecated-node-runtime。v1 linter は fact action.runs-using を問い合わせ、回答がなければ実行しません。ローカルの action(uses: ./x)では、ステップではなく x/action.yml の runs.using を報告します。
  • 1 つの害を何度も報告していたもの。0.x は、プルリクエストのコードを実行する後続のステップごとに cache-poisoning-poisonable-step を報告していました。v1 linter は害ごとに 1 つの Finding を報告し、後続のステップは Evidence や Related に含めます。

新機能

ルール

35 件のセキュリティルールを、欠陥の種類(--explain の weakness)ごとに並べています。ルールの severity は、その finding kind のうち最も重い severity です。

欠陥の種類 ルール(severity)
スクリプトインジェクション code-injection(critical)
引数インジェクション argument-injection(critical)
環境ファイルインジェクション envvar-injection(critical)、output-clobbering(critical)、envpath-injection(high)
ワークフローコマンドインジェクション set-output-injection(critical)新規、unsecure-commands(critical)新規
リクエストフォージェリ request-forgery(critical)
信頼できないコードの実行 untrusted-checkout(critical)、artifact-poisoning(critical)、untrusted-checkout-toctou(medium)、self-hosted-runner(high)
ゲートの迂回 bot-conditions(critical)、unsound-contains(critical)
AI エージェントの乗っ取り ai-action-excessive-tools(critical)、ai-action-execution-order(high)、ai-action-prompt-injection(high)、ai-action-unrestricted-trigger(high)、ai-action-unsafe-sandbox(high)
信頼できない参照 known-vulnerable-actions(critical)、commit-sha(high)、impostor-commit(high)、action-list(high)、unpinned-images(high)
認証情報の漏えい artipacked(critical)、credentials(critical)、secret-in-log(critical)、secrets-in-artifacts(critical)、unmasked-secret-exposure(critical)、secret-exfiltration(medium)
過剰な権限 cache-poisoning(high)、dangerous-triggers(high)、permissions(high)、secret-exposure(high)、secrets-inherit(high)

78 種類の finding kind の内訳は、critical 31、high 42、medium 3、low 2 です。

新しいセキュリティルール:

  • set-output-injection: id を持つステップが、攻撃者の値(issue のタイトル、コミットメッセージなど)をログに出力します。ACTIONS_ALLOW_UNSECURE_COMMANDS の値に関係なく、runner はログの行中の ##[set-output name=…;] と行頭の ::set-output をコマンドとして読み、ステップの output を書き込みます。
  • unsecure-commands: ACTIONS_ALLOW_UNSECURE_COMMANDS が true のステップで攻撃者の値がログに出力され、runner がそれを set-env や add-path として読みます。攻撃者は後続ステップの env と PATH を書き換えられます。

品質ルール 13 件: allowed-actions、archived-uses、cache-bloat、cond、dependabot-github-actions、dependency-review-settings、deprecated-commands、deprecated-node-runtime、env-var、expression、missing-timeout-minutes、unset-configuration-variable、uses-path。品質ルールの finding 単体では、攻撃者は何も得ません。品質ルールには脅威、CVSS、severity がありません。

新しい品質ルール:

  • allowed-actions: uses が、リポジトリの allowed actions 設定(fact repo.allowed-actions)で許可されていない action、reusable workflow、イメージを指定している。または、設定が完全なコミット SHA を要求しているのに、uses がタグやブランチを指定している。GitHub は実行を開始しないか、Set up job で job を失敗させます。
  • unset-configuration-variable: ${{ }} が vars.<name> を読んでいるが、どのレベル(リポジトリ、Organization、environment)でもその変数が定義されていない。GitHub は値を空文字列にし、それを渡した fromJSON は失敗します。
  • uses-path: uses のパスに空の要素、.、..、\ が含まれている、またはパスがリポジトリやワークスペースのルートより上に出る。GitHub は書かれたとおりには読みません。0.x の obfuscation のうち uses の部分を引き継ぎます。

すべてのルールに脅威モデル

  • --explain ID と --explain=all は、各ルールを Markdown で出力します。内容は、問題、期待される状態、脅威(引用と観測結果付きの前提条件、攻撃者、イベント、得るもの、advisory や CVE 付きのインシデント)、finding kind、副作用付きの fix kind、検出しない形(undetected forms)、inconclusive kind、誤検知になる形(false positive forms)、例です。
  • --explain=terms は、項目名と値の定義を出力します。
  • --registry は同じ宣言を JSON(sisakulint/registry/v0)で出力し、--registry=full は各例の fact の回答も加えます。プログラムからはこの JSON を読んでください。--explain の Markdown は変わることがあります。
  • severity: 各 finding kind は CVSS v4.0 の Base メトリクスと Exploit Maturity(E)を持ち、各値に理由が付いています。impact は VC、VI、VA、SC、SI、SA のうち最も高い値です。likelihood は AV、AT、PR から決まり、AC:H または UI:A で 1 段階下がります。impact と likelihood から表で severity を決めます(例: impact が H で likelihood が high なら critical)。--explain は参考として、FIRST のリファレンス計算機を移植した実装で求めた CVSS-B と CVSS-BT も出力します。

certainty、仮定、攻撃者

  • confirmed はビット 1 を立てます。conditional(Finding が回答のない fact に依存している。Report にその fact が示される)はビット 2 を立てます。inconclusive(ルールが読まない値など、ルールが判断できない箇所)はビット 8 を立てます。
  • どこからも回答のない fact には仮定の値(最悪の場合)を使い、それを表示します(例: assumed: repo.default-token-write = true)。--no-assumptions を付けると、それらの fact を不明として扱います。
  • デフォルトの実行では、外部の人による攻撃だけを数えます。--add-attacker VALUE は、攻撃者を 1 人追加した実行も行います。値は read-member、triage-account、writer-pull-requests-token、writer-issues-token、required-reviewer、app-installation-token、variables-writer、secrets-writer です。追加した攻撃者がいるときだけ現れる Finding には印が付きます(Report の added_attackers、テキスト出力の added attacker:、SARIF の properties.added_attackers)。各値がどの承認、ゲート、if を通過できるかは actions/boundary の表で決まり、表の各行には根拠があります。--add-attacker は --fix と同時に使えません。

fact

  • --online は GitHub API に問い合わせます(トークンは GITHUB_TOKEN)。--github-api URL で GitHub Enterprise Server の API のルートを指定できます。
  • --facts FILE はファイルから回答を読み、--write-facts FILE はその実行で問い合わせた fact と回答を書き出します。別のマシンで書き出した facts ファイルを使えば、ネットワークのない CI でも実行できます。
  • --fact KIND=VALUE または --fact 'KIND[ARG=VALUE,…]=VALUE' は 1 つの fact に回答します(値は JSON)。優先順位は --fact、facts ファイル、API の順です。
  • fact の種類は 29 あります。例: repo.public、repo.default-token-write、repo.environment-protected、repo.fork-pr-secrets、git.ref-commit、git.commit-ref、package.advisories、action.definition、workflow.definition、request.destination-trusted。すべての種類と、--online が各種類にどう回答するかは --explain=terms に載っています。
  • 他リポジトリの action と reusable workflow: --online(または回答を含む facts ファイル)を使うと、composite action とその中のステップを深さ 4 まで(action.definition)、reusable workflow とその job を深さ 3 まで(workflow.definition)読みます。中で見つかった Finding は呼び出し側の uses に報告され、中の位置は Evidence の先頭に入り、Fix はありません。action は runner が取得するアーカイブから、reusable workflow はコミットの blob から読みます。回答が得られない場合(private リポジトリ、サイズやリクエスト数の上限、深さの上限を超えた場合)、その箇所は Inconclusive(remote-unknown、remote-callee-unknown)になり、ビット 8 が立ちます。
  • pull_request_target のポリシー: public リポジトリで pull_request_target を止める GitHub のデフォルトポリシーは、2026-12-02 に適用されます。このポリシーで止まる workflow について --fact 'repo.pull-request-target-allowed[input_path=.github/workflows/<file>]=false' と回答すると、攻撃者のイベントが pull_request_target だけの finding は報告されなくなります。この fact は API には問い合わせません。回答がなければ、ルールは実行が開始されるものとして扱います。
  • .github/dependabot.yml と Renovate の設定は、--root 以下のファイルから fact として読みます。

Warning

--write-facts で書き出した facts ファイルには、読み込んだ action と reusable workflow の内容が含まれます。private リポジトリのものも含まれます。

リモートのリポジトリとプルリクエスト

  • --remote は、--root の代わりに GitHub のリポジトリを読みます。指定できるのは OWNER/REPO、OWNER/REPO@REF(ブランチ、タグ、コミット SHA)、または URL(https://github.com/OWNER/REPO、…/tree/<ref>、…/pull/<N>)です。最初に ref をコミットに解決し、以後はそのコミットだけを、git の tree API と blob API でファイルごとに読みます。clone もディスクへの書き込みもしません。Report の remote_revision には、リポジトリ、ref、コミット、tree、読んだ各ファイルとその blob SHA が載ります。
  • 上限は、1 回の実行につき 1000 リクエスト、1 ファイルにつき 1 MiB です(上限を超えた入力は読めないものとして扱われ、ビット 16 が立ちます)。tree のエントリが 100,000 を超える場合、レート制限、ネットワークエラーのときは exit code 66 で停止します。トークンがない場合、API は 1 時間に 60 リクエストまでで、1 ファイルに 1 リクエストを使います。
  • --pull-request N は、プルリクエストの head を読み(fork からのプルリクエストも読めます)、そのプルリクエストが変更した入力だけを報告します。変更は merge base と head の tree の差から求めます。symlink の参照先の変更や、uses: ./ で呼ばれる submodule のコミットの変更も変更として数えます。入力ではないが読み込むファイル(.github/dependabot.yml、labeler の設定)をプルリクエストが変更した場合は、すべての入力を報告します。
  • --pull-request-head SHA は、プルリクエストの head がその SHA でないとき、exit code 75 で停止します。結果をコミットに紐付ける場合(例: status check)に渡してください。
  • remote_revision.pull_request.behind_by は、base が merge base からどれだけ先に進んだかを示します。進んだ部分が入力や読み込んだファイルに触れている場合は、ビット 16 が立ちます。
  • --write-snapshot DIR は、読み込んだファイルを新しいディレクトリに書き出します。--fix と組み合わせると、そこにあるファイルを修正します。
  • ゲートとして使う前に確認すべきことは README.md にあります。strict なブランチ保護または merge queue を使うこと、プルリクエストが変更できない場所でゲートを動かすこと、--accept の限界です。

Fix

ルール fix kind safety 内容
commit-sha pin-sha safe ref を、runner が現在それに対して実行するコミットの完全な SHA に固定する
untrusted-checkout-toctou pin-head-sha safe ブランチや refs/pull/<n>/head の代わりに、承認時に見たコミット github.event.pull_request.head.sha を checkout する
untrusted-checkout-toctou pin-head-sha-review review refs/pull/<n>/merge の代わりに、承認時に見た head を checkout する
code-injection env-var review 式をステップの env に移し、シェルに必要なクォートを付けて変数を読む(bash と sh)
code-injection、envvar-injection、output-clobbering env-var-review review 式を env に移し、"${NAME}"(bash、sh)、$env:NAME(pwsh)、process.env.NAME(github-script)として読む。$GITHUB_ENV や $GITHUB_OUTPUT に書く値から改行を取り除くか、name<<DELIM の区切り文字をランダムにする
untrusted-checkout base-checkout review base のコードを checkout する(プルリクエストを指す入力を取り除く)
artifact-poisoning runner-temp-path review artifact をワークスペースの外の ${{ runner.temp }}/artifacts にダウンロードする
artipacked persist-credentials-false review checkout に persist-credentials: false を付ける
bot-conditions author-context review actor の代わりに github.event.pull_request.user.login を比較する
cache-poisoning cache-mode-no-write review 攻撃者のイベントではキャッシュに何も保存しない
known-vulnerable-actions upgrade-version review 完全な SHA に固定された uses を、見つかったすべての advisory を修正した最初のバージョンのコミットに固定し、行末のコメントにそのバージョンを書く
unsound-contains contains-array review contains(fromJSON('[...]'), x) にして、値全体で比較する
unsound-contains equality review contains(x, 'value') を x == 'value' にする
  • --fix は safe な種類を、--fix=review はすべての種類を適用します。--dry-run は、ファイルを書き換える代わりに git apply で適用できる diff を出力します。
  • review の Fix の副作用(Finding の解消以外の変化)は、テキスト出力の fix 行の下と、Report の fix.side_effects に出力されます。
  • --fix は、実行したルールで修正結果を確認します。他の Finding の certainty や condition を変える Fix はエラーになります。適用した Fix が、スキップしたルールの読む部分を変えた場合、そのルールは not checked: として報告されます。
$ sisakulint --root . --fix=review --dry-run
diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml
--- a/.github/workflows/triage.yml
+++ b/.github/workflows/triage.yml
@@ -6,4 +6,6 @@
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
-      - run: echo "${{ github.event.issue.title }}"
+      - run: echo "${ISSUE_TITLE}"
+        env:
+          ISSUE_TITLE: ${{ github.event.issue.title }}

出力

issues で起動し、run に ${{ github.event.issue.title }} を書いた workflow に対する、デフォルトのテキスト出力です(一部省略)。

$ sisakulint --root .
critical  code-injection.controlled  .github/workflows/triage.yml:9:24
  github.event.issue.title is written into the run script by ${{ }}, and an attacker controls it on issues
  impact: the value becomes code
    9 |       - run: echo "${{ github.event.issue.title }}"
      |                        ^^^^^^^^^^^^^^^^^^^^^^^^
  remedy: pass it through env and read the variable
  fix (review): move the expressions into the env of the step, and read the variables where they were, quoted as the shell needs (bash and sh)  [--fix=review]

high  dangerous-triggers.token-write  .github/workflows/triage.yml:6:5
  the job runs on issues, which an attacker triggers, with no approval and a GITHUB_TOKEN that may write
  ...
  assumed: repo.default-token-write = true (--no-assumptions to drop)

high  commit-sha.unpinned  .github/workflows/triage.yml:8:32
  actions/checkout@v4 is not pinned to a full commit SHA
  ...
  no fix: the commit of the ref is not known (offline: pass --facts or --online)

quality
  dependabot-github-actions.no-update-tool
    .github/workflows/triage.yml:8:32  no update tool updates actions/checkout@v4 ...

inputs  1 read  (every workflow and action.yml under --root)
...
not run  known-vulnerable-actions: ... in a run without --rule, the rule runs when --online is given, ...
4 findings: 4 confirmed (critical 1, high 3), 0 conditional, 0 inconclusive
1 quality finding: the bits do not count quality findings
bits 1 = 1 (confirmed findings)
  • --format は text(デフォルト)、line、json、sarif から選びます。--detail summary|normal|full(-v は full)と --color auto|always|never(auto は NO_COLOR に従う)も使えます。
  • --report FILE は JSON の Report を、--sarif FILE は SARIF を、stdout への出力に加えて書き出します。
  • Report には、findings[](certainty、condition、evidence、関連箇所、fix、fingerprint を含む)、quality_findings、inputs[]、errors[]、skipped_rules、reported_inputs、remote_revision があります。
  • --version は、バージョン、コミット、Go のバージョンとプラットフォーム、バイナリが読み書きする JSON スキーマを出力します。

SARIF と code scanning

  • finding kind ごとに 1 つの SARIF ルール(reportingDescriptor)があり、ID は <rule>.<kind> です。critical と high は error、medium は warning、low と info は note になり、security-severity も設定されます。品質ルールの finding は、セキュリティアラートではない note になります。
  • Inconclusive は、タグ security と inconclusive を持つアラートになります。--accept で受け入れた Inconclusive は出力されません。conditional な Finding は confirmed と同じアラートになり、回答のない fact がメッセージの末尾に付きます。
  • Related の箇所は relatedLocations に書かれ、メッセージからリンクされます。
  • partialFingerprints.primaryLocationLineHash は、行番号を含まない Fingerprint から作られます。そのため、行が移動しても Finding は同じアラートのままです。
  • ファイルの位置は uriBaseId が %SRCROOT% の相対 URI で、lint を実行したマシンの絶対パスは書かれません。
  • 読めなかった入力と内部エラーは invocations[0].toolExecutionNotifications に書かれます。
permissions:
  contents: read
  security-events: write
  actions: read   # private リポジトリでのみ必要
steps:
  # actions/checkout と、sisakulint をインストールするステップの後に置く
  - run: sisakulint --root . --sarif sisakulint.sarif
  - if: ${{ !cancelled() }}
    uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
    with:
      sarif_file: sisakulint.sarif

HTML レポートビューと例のカタログ

  • --html FILE はファイルに書き出し、--serve は 127.0.0.1 で表示します(別のループバックアドレスには --serve=ADDR)。このページは各 Finding の Evidence の経路を描画し、品質ルールの finding の行に印を付け、各 finding の条件を試せるようにします。
  • --examples --serve は、全ルールと全品質ルールの Example を、それぞれの例の fact の回答で実行した結果を表示します(1 ルールだけなら --examples=RULE --html FILE)。カタログは、ルールを weakness または attack means でグループ化し、「boundary」(ロールごとの得るものと、その根拠の行)を表示し、--explain=terms の定義にリンクします。

Warning

HTML には workflow の行が含まれます。private リポジトリの HTML を共有すると、その行が漏れます。

Inconclusive の受け入れ

  • 人が Inconclusive の箇所を確認し、値が攻撃者の値ではないと判断した場合は、その箇所を理由とともに acceptance ファイル(sisakulint/acceptances/v0)に書き、--accept FILE で渡します。その箇所はビット 8 を立てなくなり、Report の findings[] には acceptance.reason 付きで残ります。
  • エントリは、ルール、kind_id、入力、key_path、span_text、span_lines の 6 つの値が等しいときに一致します。行番号は使いません。理由が空のエントリ、未知のルール、重複したエントリがあると、exit code 66 で停止します。どれにも一致しなかったエントリは stderr に表示されます。
  • Report からテンプレートを作る jq コマンドが README.md にあります。
  • プルリクエストで acceptance ファイルを追加したり、設定ファイルを変更したりできます。プルリクエストの作者が変更できない workflow で lint を動かす場合は、これらのファイルを base ブランチから読むか、CODEOWNERS で保護してください。

その他の入力

  • --stdin-name NAME は、stdin から 1 ファイルを読み、リポジトリのパス NAME のファイルとして扱います。
  • --exclude PATH(繰り返し指定可)はパスを除外します。除外した action.yml は、除外済みとして一覧に載ります。GitHub は .github/workflows の workflow を常に実行するため、このディレクトリは除外できません。

ビルド、パッケージ、開発

  • リリースアセット: sisakulint_0.4.0_darwin_amd64.tar.gz、sisakulint_0.4.0_darwin_arm64.tar.gz、sisakulint_0.4.0_linux_amd64.tar.gz、sisakulint_0.4.0_linux_arm64.tar.gz、sisakulint_0.4.0_linux_armv6.tar.gz、sisakulint_0.4.0_checksums.txt。バイナリは CGO_ENABLED=0 でビルドしています。
  • Go: go.mod は Go 1.26.11 を要求します(v0.3.8 は Go 1.26.9)。0.x の系列では、#670 で標準ライブラリに対する govulncheck の指摘を解消するため、Go を 1.26.10 に上げています。
  • 依存関係: v0.3.8 は go-github、yaml.v3、mvdan.cc/sh、oauth2、fatih/color、go-sarif などを必要としていました。v0.4.0 はサードパーティのモジュールを必要とせず、リポジトリに go.sum はありません。
  • 32 ビットビルド(#684): v0.4.0 の最初のリリース実行は linux/arm で失敗しました。JSON の数値の指数に対する上限 1<<40 が、32 ビットの int でオーバーフローしたためです。指数は int64 になりました。
  • テスト: go test ./... は、ACTIONS_LONG=1 でない限り、最も遅い 14 個のテストをスキップします(#681)。#681 の計測では、race detector なしの go test ./... は 2 分 25 秒でした(actions/rules 277 秒 → 101 秒、actions/cli 191 秒 → 67 秒、actions/reportview 137 秒 → 12 秒)。CI は race detector なしでテストを実行します(#683)。ACTIONS_UPSTREAM=1(GH_TOKEN 付き)は、他プロジェクトから取り込んだデータをそのプロジェクトと比較するテストを実行し、.github/workflows/upstream-drift.yaml が毎週それを実行します。CI は govulncheck v1.6.0 と gofmt のチェックも実行します。
  • パッケージの構成は CLAUDE.md に書かれています。

今後の互換性

JSON スキーマは sisakulint/report/v0、sisakulint/registry/v0、sisakulint/facts/v0、sisakulint/acceptances/v0 です(--version で一覧できます)。v0.4.0 は、以降の 0.x リリースで JSON スキーマと Go パッケージの互換性が保たれることを約束しません。

アップグレードのチェックリスト

  1. 新しいモジュールパスからインストールするか、go install github.com/sisaku-security/sisakulint/cmd/sisakulint@v0.3.8 で 0.x に固定する。Homebrew と sisakulint-action は、アップグレードする前に確認する。
  2. 削除されたフラグと、意味が変わったフラグ(-fix on、-format '{{…}}'、-ignore、-enable-rule、-config-file、-github-token)を置き換える。
  3. exit code の処理を、ビット 1、2、4、8、16 とコード 64、66、70、74、75 に合わせて書き換える。
  4. --skip-rule と --rule のルール名を、MIGRATION.md の 6 節の表に従って書き換える。
  5. --init --legacy-configuration で設定を移行し、--config で渡す。
  6. CI では、ステップの env に GITHUB_TOKEN を設定し、--online --repo "$GITHUB_REPOSITORY"(または facts ファイル)を渡す。
  7. 0.x のアラートと比較したい場合は、新しい category で SARIF をアップロードする。
  8. 一度 --format json で実行し、conditional と inconclusive の finding を確認する。足りない fact に回答するか、確認済みの Inconclusive を --accept で受け入れる。

プルリクエスト

  • #670 govulncheck の標準ライブラリに対する指摘を解消するため、Go を 1.26.10 に更新(@sushant-me)
  • #679 0.x の実装を v1 linter に置き換え、CI・リリース・レビューの設定を対応させ、移行手順を文書化(@on-keyday)
  • #680 MIGRATION.md: v0.4.0 が書き直した linter の最初のリリースであることを明記(@on-keyday)
  • #681 最も遅い 14 個のテストをデフォルトでスキップし、ACTIONS_LONG=1 で実行するように変更(@on-keyday)
  • #682 モジュールパスを github.com/gh-intel/sisakulint に変更(@on-keyday)
  • #683 v0.4.0 の前に、文書から時期に依存する記述を取り除き、CI のテストを race detector なしで実行するように変更(@on-keyday)
  • #684 v0.4.0 のリリースを失敗させた 32 ビットプラットフォーム(linux/arm)のビルドを修正(@on-keyday)

Full Changelog: v0.3.8...v0.4.0