ForgeGuard Documentation

HGN Industries · Atlassian Jira Cloud (Forge nodejs22.x) · Module: forgeguard-compliance-gatekeeper

1. Overview and Zero-Egress Architecture

ForgeGuard is a deterministic Jira Cloud workflow validator that enforces SOX Segregation of Duties, required audit fields, HIPAA-style transition invariants, and PII/secret leak prevention directly on workflow transitions.

2. Prerequisites and Installation

  1. In Jira Cloud (with Jira ADMINISTER permission), open Apps → Explore more apps and select ForgeGuard.
  2. Select Get it now, choose your Jira Cloud site, and review the least-privilege scopes (read:jira-work, read:jira-user, storage:app).

3. Adding ForgeGuard Compliance Gatekeeper to a Workflow Transition

  1. Open Jira Settings → Issues → Workflows and edit your target workflow.
  2. Select the transition to protect (for example, Approve for Production, Deploy, or Done).
  3. Open the Validators tab, select Add validator, and choose ForgeGuard Compliance Gatekeeper.
  4. Configure Segregation of Duties (FG-SOX-001), Required Audit Fields (FG-SOX-002), Transition Invariants (FG-HIPAA-001), and PII/Secret detectors (FG-PII-* / FG-SEC-*).
  5. Save the validator and publish the workflow draft.

Note on monotonic policy merging: When a site-wide baseline policy exists in Forge KVS (policy:v1:active) alongside an inline workflow configuration, ForgeGuard merges them monotonically so inline configs can strengthen controls but never weaken or disable the baseline.

4. Rule Reference

4.1 FG-SOX-001 — Segregation of Duties (SoD)

Prevents self-approval on gated transitions by comparing the transitioning actor's accountId against the issue creator, assignee, and/or reporter. Fails closed if actor identity is unavailable.

4.2 FG-SOX-002 — Required Audit Fields

Requires configured standard or custom fields to meet minimum trimmed length and optional formatPattern regex validation. Every custom regex is checked by assertLinearTimeRegex to block ReDoS patterns.

4.3 FG-HIPAA-001 — Workflow Transition Invariants

Blocks explicitly disallowed fromStatus → toStatus jumps and requires exact compliance marker tokens (split on commas, semicolons, or newlines) on regulated target statuses. Fails closed if status metadata is unavailable.

4.4 PII and Secret Leak Detectors (FG-PII-* / FG-SEC-*)

Rule IDDetectsValidation Controls
FG-PII-SSNUS Social Security Numbers (XXX-XX-XXXX)Non-digit boundaries and SSA structural validation.
FG-PII-PANPayment Card Numbers (13-19 digits; grouped, Amex, or contiguous)Non-digit boundaries and Luhn checksum verification.
FG-SEC-AWS-KEYAWS Access Key IDs (AKIA... / ASIA...)Non-alphanumeric boundaries.
FG-SEC-GITHUB-TOKENGitHub tokens (gh[pousr]_..., github_pat_...)Non-alphanumeric boundaries.
FG-SEC-ATLASSIAN-TOKENAtlassian API Tokens (ATATT3xFfGF0...)Non-alphanumeric boundaries.
FG-SEC-SLACK-TOKENSlack Bot/User/App Tokens (xox[baprs]-...)Non-alphanumeric boundaries.
FG-SEC-PRIVATE-KEYPEM Private Key Headers (RSA, EC, DSA, OPENSSH, PGP, ENCRYPTED, generic)Linear-time header match.

ForgeGuard scans Atlassian Document Format (ADF) fields contiguously across inline formatting marks as well as hyperlink URLs (marks[].attrs.href) and card URLs (attrs.url). Blocking errors never echo matched secrets.

5. Compute Budgets, Audit Trail, and Licensing