
Research
/Security News
OpenAPI React Query Codegen Compromised in Mini Shai-Hulud npm Supply Chain Attack
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.
@trigguard/decision
Advanced tools
TrigGuard HTTP decision client: authorize() → POST /decide (no policy in-process)
@trigguard/decisionThin Node client: authorize() → POST /decide → remote authority returns PERMIT or DENY. No policy logic in this package.
Contract: /decide → PERMIT | DENY only — see decision-output.md.
npm install @trigguard/decision
The unscoped npm name trigguard is a different package. Use @trigguard/decision for this HTTP client.
From the monorepo:
npm install file:./sdk/node
const { authorize } = require("@trigguard/decision");
const decision = await authorize({
surface: "deployCommit",
context: {
repository: "org/repo",
ref: "refs/heads/main",
sha: "abc123",
},
});
if (decision.decision !== "PERMIT") {
throw new Error("TrigGuard denied execution");
}
Optional second argument: { endpoint, token, timeoutMs, signal, maxRetries }. Defaults: TRIGGUARD_ENDPOINT / TRIGGUARD_TOKEN from the environment.
This package is published as CommonJS ("type": "commonjs"). In Node, use a default import and call .authorize:
import tg from "@trigguard/decision";
const decision = await tg.authorize({
surface: "deployCommit",
context: { repository: "org/repo", ref: "refs/heads/main", sha: "abc123" },
});
if (decision.decision !== "PERMIT") {
throw new Error("TrigGuard denied execution");
}
Named imports are not supported in 0.2.x (import { authorize } from "…" may fail or behave inconsistently) because there is no separate exports.import entry yet. A dual ESM surface is planned for a future minor (e.g. 0.3).
TrigGuard uses a remote decision authority (policy decision point).
authorize() sends JSON to TRIGGUARD_ENDPOINT (default https://decision.trigguard.ai/decide). The service evaluates the payload and returns PERMIT or DENY (and often reasonCode / human-readable fields).
CI integrations (e.g. trigguard-github-action/decision-gate) fail closed when the decision is not PERMIT.
Standard policy shape:
Policy Enforcement Point (your CI job, app, or SDK caller)
→ Policy Decision Point (TrigGuard /decide)
→ PERMIT | DENY
signals and contextThe SDK forwards the object you pass: surface (string), optional signals, optional context. The authority runs remotely; richer structured fields allow stronger policy without embedding rules in the client.
Example:
{
"surface": "merge.pull_request",
"signals": {
"event_type": "pull_request",
"actor": "dev123"
},
"context": {
"repository": "org/repo",
"branch": "feature-x"
}
}
What we are not doing in 0.2.x: no built-in diff extraction, no automatic surface inference from GitHub events, and no mandated signal schema — integrators supply evidence explicitly.
The client uses fetch with a default 5s timeout, optional AbortSignal, limited retries on transient errors, and typed errors: TrigGuardNetworkError, TrigGuardTimeoutError, TrigGuardDecisionServiceError.
| Variable | Purpose |
|---|---|
TRIGGUARD_ENDPOINT | Decision URL (default: https://decision.trigguard.ai/decide) |
TRIGGUARD_TOKEN | Bearer token when not passed in options.token |
cd sdk/node && npm login && npm publish --access public
See docs/distribution/PUBLISH_DECISION_CLIENT.md.
Related package: packages/trigguard-sdk (npm trigguard) is the broader unified SDK — different artifact from @trigguard/decision.
FAQs
TrigGuard HTTP decision client: authorize() → POST /decide (no policy in-process)
The npm package @trigguard/decision receives a total of 8 weekly downloads. As such, @trigguard/decision popularity was classified as not popular.
We found that @trigguard/decision demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Research
/Security News
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.

Security News
Socket joins more than 100 technology, cybersecurity, and financial organizations calling for a global surge in cyber defense.

Product
Enterprise security teams can now detect malware, credential theft, suspicious network activity, and risky updates across Microsoft Edge extensions.