GitHub Action reference¶
Usage¶
- id: testseal
uses: satwiksps/testseal@d12f42c93b565c3a0b27acf8eabafce881c09b35 # v1.0.1
with:
fail-on: high
The Action runs on Node.js 24 and invokes the bundled Python core. Run
actions/setup-python first with Python 3.11 or newer.
Inputs¶
| Input | Required | Default | Description |
|---|---|---|---|
base |
No | Event-derived | Base Git ref or commit |
head |
No | Event-derived or HEAD |
Head Git ref or commit |
staged |
No | false |
Analyze staged changes |
config |
No | Discovered policy | TOML configuration path |
paths |
No | All eligible changes | Newline-delimited repository paths |
fail-on |
No | Repository policy | never, low, medium, or high |
python-command |
No | python |
Python executable name or absolute path |
install |
No | true |
Install bundled TestSeal source before scanning |
Input constraints¶
stagedcannot be combined withbaseorhead.python-commandcannot contain line breaks or NUL bytes.python-commandis executed directly, not through a shell.- executable names are resolved from
PATH, without an implicit checkout search. pathsis trimmed and blank entries are removed.- boolean inputs accept only
trueorfalse, case-insensitively. - an explicit
fail-onvalue overrides repository configuration.
Event-derived revisions¶
When base, head, and staged are omitted:
pull_requestusespull_request.base.shaandpull_request.head.sha;merge_groupusesmerge_group.base_shaandmerge_group.head_sha;- other events use the CLI working-tree default.
The event SHA values must be 40 to 64 hexadecimal characters. Missing or invalid event values fail the Action before scanning.
Installation behavior¶
With install: true, the Action runs the equivalent of:
The path is resolved from the Action archive, not from the consumer workspace.
If the bundled pyproject.toml is missing, the Action fails closed instead of
installing an unrelated repository project or falling back to PyPI.
With install: false, the selected Python environment must already provide a
compatible testseal module in a virtual environment or system installation.
Installation and scanning use Python's isolated mode (-I). This prevents
checkout files such as pip.py, testseal.py, and sitecustomize.py from
being imported as tools or startup code. PYTHONPATH, other PYTHON*
environment variables, and user-site packages are ignored. Python environment
overrides are removed before launch so pip's build subprocesses cannot inherit
them. An installation
made only with pip install --user is therefore not available to the Action.
Outputs¶
Summary and result outputs are set only after a valid TestSeal report is
accepted. Errors before that point set only outcome to error.
| Output | Type | Description |
|---|---|---|
finding-count |
integer string | Visible finding count |
high-count |
integer string | High-severity count |
medium-count |
integer string | Medium-severity count |
low-count |
integer string | Low-severity count |
files-scanned |
integer string | Eligible changed file count |
suppressed-count |
integer string | Fingerprint-suppressed count |
outcome |
string | Normalized Action outcome |
result |
JSON string | Normalized JSON report |
GitHub Action outputs are strings when consumed in expressions. Parse numeric
values with fromJSON when numeric comparison is required:
Parse the full report:
- name: Save normalized report
env:
TESTSEAL_RESULT: ${{ steps.testseal.outputs.result }}
run: printf '%s\n' "$TESTSEAL_RESULT" > testseal.json
Outcomes¶
| Outcome | Meaning | Step state |
|---|---|---|
clean |
Scan completed with no visible findings or warnings | Success |
findings |
Advisory scan completed with findings | Success |
incomplete |
Scan produced parse warnings | Success in advisory mode, failure in blocking mode |
threshold-failed |
CLI returned 1 |
Failure |
error |
Input, install, process, or report error | Failure |
When the CLI returns 2 with a valid report containing warnings, the Action
emits annotations and outputs before failing the step as incomplete. Exit 2
without a valid warning-bearing report is an error.
Annotations¶
Each finding becomes a source annotation. Severity maps to the annotation level;
the annotation carries the finding message and any available path, line, and
column. Evidence, remediation, and fingerprint data remain in the result output.
Parse warnings become workflow warnings. Source-derived values are passed through the Actions toolkit rather than emitted as workflow command strings.
Permissions¶
The Action needs only read access to repository contents:
It does not upload reports or call an external TestSeal service.