sastastic
Ingests Semgrep SAST output (JSON) and creates Jira tickets for each finding. Designed to run in CI on every push — duplicate findings are automatically skipped and tickets for resolved findings are closed.
Requirements
- Python 3.8+
- A
sast.jsonfile in the working directory (Semgrep JSON output) - Jira API credentials set as environment variables (Only if you need to check against existing tickets)
Installation
pip install sastastic
Environment Variables
| Variable | Description |
|---|---|
JIRA_KEY |
Jira API token |
JIRA_URL |
Jira REST API issue endpoint (e.g. https://your-org.atlassian.net/rest/api/3/issue) |
JIRA_EMAIL |
Email address associated with the API token |
JIRA_PROJECT |
Jira project key (e.g. SEC) |
Variables can be set in the environment or in a .env file in the working directory.
Usage
sastastic — Create Jira tickets (CI/CD)
sastastic "app-name" "PARENT-TICKET" [--severity high|med|low|all] [--env <name>]
[--not-before <date>] [--ignore-suppressions] [--allow]
app-name— label for the application being scanned (used in ticket summaries)PARENT-TICKET— Jira issue key to attach findings to as subtasks (e.g.SEC-42)
Idempotent by design: each finding is fingerprinted and stored as a Jira label (sastastic-<fingerprint>). On subsequent runs:
- Findings with an existing open ticket are skipped
- Tickets whose finding no longer appears in the scan are automatically transitioned to Done (auto-close is based on finding presence, not severity — lowering
--severityon a later run will not close tickets for findings that are still detected)
Fails the build by default. sastastic exits with code 1 when it sees any new finding at or above the severity threshold. A finding is new when:
- no open ticket tracks it yet, or
- the ticket tracking it was raised on or after
--not-before(see below)
...unless its ticket is suppressed (see below), which exempts it either way.
Ticket age is the only thing that makes an already-tracked finding block. Without --not-before, any finding with an open ticket is skipped.
Tickets are still created, and resolved findings are still closed, before exiting. Pass --allow to report new findings without failing.
Flags:
| Flag | Description |
|---|---|
--severity high|med|low|all |
Only create tickets for findings at or above this severity. Default: high |
--env <name> |
Record findings as present on a deployed environment (e.g. prod, staging). Descriptive only. See below. |
--not-before <date> |
Treat findings ticketed on or after this date as new. See below. |
--ignore-suppressions |
Ignore suppression labels and report the true unsuppressed picture. |
--allow |
Explicitly permit new vulnerabilities — report them but exit 0 instead of 1. |
Unknown flags are a hard error, so a typo in --allow can never silently let a build through.
Deployed environments (--env)
--env <name> records that the findings in this scan are live on that environment. Tickets created by that run get a sastastic-env-<name> label and a FOUND ON: line in the description. Tickets that already exist are left untouched — sastastic never goes back and re-labels them, so the label always reflects where a finding was first seen.
--env is descriptive only and never affects whether a build fails. Environments are reported alongside a ticket (Skipping (exists: SEC-101, seen on prod)) so you can see at a glance which findings reached production, but blocking is decided purely by ticket age. Use --not-before for the gate.
The name is slugified for use as a Jira label (--env "US East / Prod" → sastastic-env-us-east-prod).
sastastic "app-name" "SEC-42" --env prod # records findings as live on prod
sastastic "app-name" "SEC-42" --allow # CI push build: create tickets, never fail
Ticket age (--not-before)
--not-before <date> uses a ticket's age as a new/old threshold: a finding whose ticket was raised on or after the date still counts as new and blocks the build, while anything older is treated as accepted debt and skipped. This lets you draw a line under an existing backlog without closing it — everything found since the line must be fixed, everything before it stays open in Jira without breaking deployments.
sastastic "app-name" "SEC-42" --not-before 2026-01-01 # block on anything ticketed this year
sastastic "app-name" "SEC-42" --not-before 2026-01-01T12:00:00Z # full ISO 8601 also accepted
The date accepts YYYY-MM-DD or a full ISO 8601 timestamp; a value with no timezone is read as UTC. An unparseable date is a hard error.
Ticket age comes from Jira's own created date rather than a label of sastastic's own, which means the flag works on tickets raised before this feature existed — there is nothing to migrate and no blind spot in your backlog. Since sastastic raises a ticket the moment it first sees a finding, that date is when the finding was first seen; Jira preserves it across reopens, status changes and project moves.
Without the flag, dates never affect blocking, so this changes nothing until you opt in. One detail worth knowing: a ticket whose created date cannot be read counts as new. A security gate should fail closed rather than wave a finding through on missing metadata.
Suppressing a finding
To accept a vulnerability and stop it failing builds, add the sastastic-suppress label to its Jira ticket. The finding stays tracked and stays reported — it just no longer blocks.
Set the ticket's due date to put the suppression up for review. sastastic reads the due date only on tickets carrying the suppress label, so it means nothing on any other ticket and teams already using due dates for their own purposes are unaffected.
| Ticket state | Effect |
|---|---|
sastastic-suppress, no due date |
Suppressed indefinitely, reported on every run |
sastastic-suppress, due date in the future |
Suppressed, reported with days remaining |
sastastic-suppress, due date passed |
Blocks again, reason suppression expired <date> |
The due date is the last day the suppression holds — it lapses the day after.
Suppression is purely subtractive: it can only ever stop a finding blocking, never start one. An expired suppression on a finding that wouldn't have blocked anyway is reported as a warning but changes nothing.
Every run prints what is suppressed, with days remaining, and warns about anything past its review date. This is deliberately noisy — a suppression nobody sees is how a known vulnerability quietly becomes permanent. --ignore-suppressions disregards the labels entirely, for an audit or a hardening run that needs the real picture.
sastastic "app-name" "SEC-42" --not-before 2026-01-01
...
Suppressed (exists: SEC-101, until 2026-12-01): CWE-89 at app/views.py
1 finding suppressed:
SEC-101 suppressed until 2026-12-01 (98 days left)
Warning: 1 suppression past its review date — no longer suppressing:
SEC-102 expired 2026-08-01 (24 days ago)
Since suppression is keyed to the ticket, and a ticket to a finding's fingerprint, a suppression lapses if the finding's fingerprint changes — a new ticket is filed and blocks. Semgrep's own fingerprint is used when present, which survives ordinary edits, but a large refactor can still re-raise a finding you had accepted. Arguably correct (it wants re-review in its new context), but worth expecting.
Two caveats worth being deliberate about:
- Anyone who can edit a Jira ticket can suppress a finding. This gives you visibility and an audit trail — Jira history records who added the label — not enforcement. If you need approval control, that requires a permission-gated workflow transition instead.
- A due date that cannot be parsed counts as expired, not as indefinite. An unreadable review date should not grant open-ended cover.
sastestic — Dry-run preview (local development)
Preview what tickets would be created without touching Jira.
sastestic [--windows] [--severity high|med|low|all] [--not-before <date>] [--ignore-suppressions]
Flags:
| Flag | Description |
|---|---|
--windows |
Read sast.json as UTF-16 (required on some Windows environments) |
--severity high|med|low|all |
Control which findings are displayed. Default: high |
--not-before <date> |
Preview the run with a ticket-age threshold, as sastastic --not-before |
--ignore-suppressions |
Preview with suppressions disregarded, as sastastic --ignore-suppressions |
Default output behavior:
By default, sastestic only shows findings that are actionable:
- When Jira credentials are configured: findings that would generate a new ticket, plus all findings at or above the severity threshold (new or existing)
- When Jira credentials are not configured: findings at or above the severity threshold only
Use --severity to widen or narrow what is shown. The Total: line always reflects all findings in the scan regardless of the severity filter; the Would create: and Would block: counts below it only count findings at or above the threshold, so they match what sastastic would actually do.
Findings that still count as new despite having a ticket are shown as [BLOCKING: KEY, <reason>] and counted toward Would block: — for example [BLOCKING: SEC-101, ticketed 2026-07-01] under --not-before. Suppressed findings show as [SUPPRESSED: SEC-101, until 2026-12-01] and are counted separately on a Suppressed: line. Any recorded environment is appended as context in every state: [EXISTS: SEC-101, seen on prod].
Example output (--severity all):
Issue 1: [HIGH] CWE-89: SQL Injection
Rule: python.django.security.injection.tainted-sql-string
File: app/views.py line(s) 42-44
Details: Detected user input used directly in a SQL query.
Issue 2: [MEDIUM] CWE-79: Cross-Site Scripting
Rule: javascript.react.security.audit.react-dangerouslysetinnerhtml
File: src/components/Comment.jsx line(s) 17-17
Details: dangerouslySetInnerHTML usage detected.
Total: 2 findings: 1 HIGH, 1 MEDIUM
Example output (default, with Jira credentials present):
Checking Jira for existing tickets...
Issue 1: [HIGH] CWE-89: SQL Injection [EXISTS: SEC-101]
Rule: python.django.security.injection.tainted-sql-string
File: app/views.py line(s) 42-44
Details: Detected user input used directly in a SQL query.
Issue 2: [MEDIUM] CWE-79: Cross-Site Scripting [NEW]
Rule: javascript.react.security.audit.react-dangerouslysetinnerhtml
File: src/components/Comment.jsx line(s) 17-17
Details: dangerouslySetInnerHTML usage detected.
Total: 2 findings: 1 HIGH, 1 MEDIUM
Would create: 1 new ticket
Would block: 1 new finding (exit 1 without --allow)
Generating sast.json
Run Semgrep with JSON output and save to sast.json in your project root:
semgrep --config auto --json -o sast.json .
Metadata
Release files for sastastic 2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sastastic-2.0.2.tar.gz | 54.8 kB | Without provenance | Details for sastastic-2.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sastastic-2.0.2-py3-none-any.whl | Python 3 | none | any | Details for sastastic-2.0.2-py3-none-any.whl |
Total release size: 95.4 kB
Release files / sastastic-2.0.2.tar.gz
| Download URL | sastastic-2.0.2.tar.gz |
|---|---|
| Size | 54.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e40f10e3ce117ed8241b4221356cb79cdbc6b44759a51c714cf0ced2c555fd51
|
|
BLAKE2b-256 checksum How to use checksums |
d564a5c1e5bae520aabaad5a4bc7e25dbb883ab1e626797ebe99e144d3e8ccc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / sastastic-2.0.2-py3-none-any.whl
| Download URL | sastastic-2.0.2-py3-none-any.whl |
|---|---|
| Size | 40.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68a8a46c812d71581ceac727540ccc34b421cb93841c71817bdf45dc19afab6b
|
|
BLAKE2b-256 checksum How to use checksums |
403dd3f8b9f262d289acfd4ba11658cb083065d7345a88be8c4bac509bf9f3a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for sastastic 2.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.