fullshield 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/README.md +4 -4
- package/dist/agent.js +1535 -348
- package/dist/cli/index.js +2175 -387
- package/dist/compliance.js +4 -0
- package/dist/index.d.ts +54 -3
- package/dist/index.js +1890 -426
- package/dist/mcp.js +1546 -359
- package/dist/vex.js +4 -2
- package/package.json +2 -2
- package/rules/README.md +2 -0
- package/rules/SUPPLY-CHAINC2-001.md +3 -0
- package/rules/SUPPLY-PLATFORMGATE-001.md +3 -0
- package/rules/SUPPLY-SECHOLDER-001.md +3 -0
- package/rules/SUPPLY-STEALER-001.md +3 -0
package/dist/compliance.js
CHANGED
|
@@ -78,6 +78,10 @@ var RULE_MAP = [
|
|
|
78
78
|
ROW("SUPPLY-PROVENANCE-001", "A08:2021 Integrity Failures", "CWE-494", "V14.2.3", "PCI DSS 6.3.3"),
|
|
79
79
|
ROW("SUPPLY-WORM-001", "A06:2021 Vulnerable Components", "CWE-506", "V14.2.1", "PCI DSS 6.3.3 / 12.10"),
|
|
80
80
|
ROW("SUPPLY-WORKFLOW-001", "A08:2021 Integrity Failures", "CWE-829", "V14.2.3", "PCI DSS 6.3.3"),
|
|
81
|
+
ROW("SUPPLY-CHAINC2-001", "A06:2021 Vulnerable Components", "CWE-506", "V14.2.1", "PCI DSS 6.3.3"),
|
|
82
|
+
ROW("SUPPLY-STEALER-001", "A06:2021 Vulnerable Components", "CWE-506", "V14.2.1", "PCI DSS 12.10"),
|
|
83
|
+
ROW("SUPPLY-PLATFORMGATE-001", "A06:2021 Vulnerable Components", "CWE-829", "V14.2.1", "PCI DSS 6.3.3"),
|
|
84
|
+
ROW("SUPPLY-SECHOLDER-001", "A06:2021 Vulnerable Components", "CWE-506", "V14.2.1", "PCI DSS 6.3.3"),
|
|
81
85
|
ROW("IAC-GHA-UNPINNED-001", "A08:2021 Integrity Failures", "CWE-494", "V14.2.3", "PCI DSS 6.3.3"),
|
|
82
86
|
ROW("IAC-GHA-PRTARGET-001", "A01:2021 Broken Access Control", "CWE-269", "V4.1.1", "PCI DSS 7.2"),
|
|
83
87
|
ROW("IAC-GHA-PERMS-001", "A01:2021 Broken Access Control", "CWE-250", "V4.1.1", "PCI DSS 7.2"),
|
package/dist/index.d.ts
CHANGED
|
@@ -59,6 +59,21 @@ interface Finding {
|
|
|
59
59
|
stillAtHead?: boolean;
|
|
60
60
|
/** Read-only identity check (`scan --verify-secrets`). Never includes the secret. */
|
|
61
61
|
verification?: 'live' | 'revoked' | 'unknown';
|
|
62
|
+
/** Why the reachability class was chosen. Present only with FULLSHIELD_EXPERIMENTAL_REACH_EVIDENCE=1. */
|
|
63
|
+
reachabilityEvidence?: {
|
|
64
|
+
imports: Array<{
|
|
65
|
+
file: string;
|
|
66
|
+
line: number;
|
|
67
|
+
specifier: string;
|
|
68
|
+
}>;
|
|
69
|
+
calls?: Array<{
|
|
70
|
+
file: string;
|
|
71
|
+
line: number;
|
|
72
|
+
symbol: string;
|
|
73
|
+
}>;
|
|
74
|
+
dependencyPath?: string[];
|
|
75
|
+
reason: string;
|
|
76
|
+
};
|
|
62
77
|
}
|
|
63
78
|
interface FindingSummary {
|
|
64
79
|
total: number;
|
|
@@ -95,9 +110,20 @@ interface AiConfig {
|
|
|
95
110
|
/** Highest-severity findings sent to the model first. */
|
|
96
111
|
maxFindings: number;
|
|
97
112
|
}
|
|
113
|
+
interface SastSourceConfig {
|
|
114
|
+
callee: string;
|
|
115
|
+
returns: 'tainted';
|
|
116
|
+
}
|
|
117
|
+
interface SastSanitizerConfig {
|
|
118
|
+
callee: string;
|
|
119
|
+
clears: string[];
|
|
120
|
+
}
|
|
98
121
|
interface SastConfig {
|
|
99
122
|
/** Files larger than this are not parsed. Reported as SAST-SKIP-001. */
|
|
100
123
|
maxFileBytes: number;
|
|
124
|
+
/** Present only when FULLSHIELD_EXPERIMENTAL_CUSTOM_SANITIZERS=1. */
|
|
125
|
+
sources?: SastSourceConfig[];
|
|
126
|
+
sanitizers?: SastSanitizerConfig[];
|
|
101
127
|
}
|
|
102
128
|
interface ResolvedConfig {
|
|
103
129
|
modules: ModuleName[];
|
|
@@ -234,6 +260,23 @@ interface ScanMetadata {
|
|
|
234
260
|
modulesRun: ModuleName[];
|
|
235
261
|
/** Set when `scan --history` stops at the commit cap. Exact text: `scanned N of M commits`. */
|
|
236
262
|
history?: string;
|
|
263
|
+
/** Phase 48. Direct dependencies no project file imports. Absent when the list is empty. */
|
|
264
|
+
unusedDirect?: {
|
|
265
|
+
packages: string[];
|
|
266
|
+
advisories: number;
|
|
267
|
+
};
|
|
268
|
+
/** Phase 49. Direct version bumps taken from OSV `fixed` versions. Absent when there is nothing to say. */
|
|
269
|
+
upgradePlan?: {
|
|
270
|
+
bumps: Array<{
|
|
271
|
+
name: string;
|
|
272
|
+
from: string;
|
|
273
|
+
to: string;
|
|
274
|
+
safe: boolean;
|
|
275
|
+
findings: number;
|
|
276
|
+
}>;
|
|
277
|
+
unresolved: string[];
|
|
278
|
+
sentence: string;
|
|
279
|
+
};
|
|
237
280
|
}
|
|
238
281
|
interface PolicyScanResult {
|
|
239
282
|
enabled: true;
|
|
@@ -443,8 +486,12 @@ declare function parseIgnore(line: string): {
|
|
|
443
486
|
*/
|
|
444
487
|
declare function applyInlineSuppressions(findings: readonly Finding[], sources: Readonly<Record<string, string>>): Finding[];
|
|
445
488
|
|
|
446
|
-
|
|
447
|
-
|
|
489
|
+
interface ConsoleReportOptions {
|
|
490
|
+
/** Print every finding, with no 20-row cap. */
|
|
491
|
+
all?: boolean;
|
|
492
|
+
}
|
|
493
|
+
/** Human-readable report. Default view is the actionable rows. JSON is unchanged. */
|
|
494
|
+
declare function renderConsoleReport(input: ScanResult, options?: ConsoleReportOptions): string;
|
|
448
495
|
|
|
449
496
|
/** Standalone HTML report. Finding text is escaped; secrets are already masked. */
|
|
450
497
|
declare function renderHtmlReport(input: ScanResult): string;
|
|
@@ -495,7 +542,9 @@ declare function parseScanDocument(text: string): DiffFinding[];
|
|
|
495
542
|
/** Human summary. Lists at most 20 added findings. */
|
|
496
543
|
declare function renderDiffText(diff: ScanDiff): string;
|
|
497
544
|
|
|
498
|
-
declare function buildSbom(cwd: string
|
|
545
|
+
declare function buildSbom(cwd: string, options?: {
|
|
546
|
+
includeReach?: boolean;
|
|
547
|
+
}): Promise<Record<string, unknown>>;
|
|
499
548
|
|
|
500
549
|
interface SbomComponent {
|
|
501
550
|
name: string;
|
|
@@ -508,6 +557,8 @@ interface SbomInput {
|
|
|
508
557
|
version: string;
|
|
509
558
|
components: SbomComponent[];
|
|
510
559
|
findings?: Finding[];
|
|
560
|
+
/** Phase 66. Off unless the caller sets it. */
|
|
561
|
+
includeReach?: boolean;
|
|
511
562
|
}
|
|
512
563
|
declare function validateCycloneDx15(doc: unknown): string[];
|
|
513
564
|
declare function renderCycloneDx(input: SbomInput): Record<string, unknown>;
|