@aegis-scan/core 0.16.1 → 0.16.3
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/dist/config.d.ts.map +1 -1
- package/dist/config.js +13 -7
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/is-test-path.d.ts +48 -0
- package/dist/is-test-path.d.ts.map +1 -0
- package/dist/is-test-path.js +74 -0
- package/dist/is-test-path.js.map +1 -0
- package/package.json +2 -1
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,YAAY,CAAC;AAqO7D;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC;AA0CjF,wBAAsB,UAAU,CAC9B,WAAW,EAAE,MAAM,EACnB,IAAI,GAAE,WAAW,CAAC,MAAM,CAAU,GACjC,OAAO,CAAC,WAAW,CAAC,CA4DtB"}
|
package/dist/config.js
CHANGED
|
@@ -163,15 +163,21 @@ const DEFAULT_IGNORE = [
|
|
|
163
163
|
'.windsurf',
|
|
164
164
|
'.codex',
|
|
165
165
|
'.aider',
|
|
166
|
-
// Test + benchmark fixtures (v0.7.1
|
|
167
|
-
// noise — they contain intentionally-
|
|
168
|
-
//
|
|
169
|
-
//
|
|
170
|
-
//
|
|
166
|
+
// Test + benchmark fixtures (v0.7.1, narrowed v0.16.3 D-CA-001):
|
|
167
|
+
// scanning these is almost always noise — they contain intentionally-
|
|
168
|
+
// vulnerable code OR mocked data. The list deliberately OMITS bare
|
|
169
|
+
// `'test'` and `'tests'` since those matched as path-segments
|
|
170
|
+
// anywhere (including legitimate Next.js App Router routes like
|
|
171
|
+
// `app/api/test/route.ts`), silently hiding real vulnerabilities
|
|
172
|
+
// whenever an operator named a route `test` / `tests`. Round-7
|
|
173
|
+
// comprehensive audit empirical-repro: identical source under
|
|
174
|
+
// `/test/` got 0 findings while under `/vuln/` got 6. Unambiguous
|
|
175
|
+
// test-framework conventions (`__tests__`, `__test__`, `__mocks__`,
|
|
176
|
+
// `__fixtures__`) remain — those are zero-collision-risk. Users who
|
|
177
|
+
// want to skip their own `test/` directory can add it via
|
|
178
|
+
// aegis.config.json `ignore` (unions with this list) or via CLI.
|
|
171
179
|
'__tests__',
|
|
172
180
|
'__test__',
|
|
173
|
-
'test',
|
|
174
|
-
'tests',
|
|
175
181
|
'__mocks__',
|
|
176
182
|
'__fixtures__',
|
|
177
183
|
'fixtures',
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC,CAAC;AAC5F,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AAEtF,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,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,EAAE,CAAC;YAC9C,MAAM,CAAC,gBAAgB,GAAG,UAAU,CAAC,gBAAgB,CAAC;QACxD,CAAC;QACD,IAAI,UAAU,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;YAC1C,MAAM,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;QAChD,CAAC;QACD,IAAI,UAAU,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;YAChD,MAAM,CAAC,kBAAkB,GAAG,UAAU,CAAC,kBAAkB,CAAC;QAC5D,CAAC;QACD,IAAI,UAAU,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;YAC5C,MAAM,CAAC,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;QACpD,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { loadConfig, type ConfigFileShape } from './config.js';
|
|
|
5
5
|
export { Orchestrator } from './orchestrator.js';
|
|
6
6
|
export { exec, commandExists, walkFiles, readFileSafe, clearWalkFilesCache, getChangedFiles, type ExecResult, type ExecOptions } from './utils.js';
|
|
7
7
|
export { getVersion } from './version.js';
|
|
8
|
+
export { isTestFile } from './is-test-path.js';
|
|
8
9
|
export { parseSuppressions, isSuppressed, getUnusedSuppressions, getNakedSuppressions, type Suppression, } from './suppressions.js';
|
|
9
10
|
export { globToRegex, configSuppressionMatches, applyPipelineSuppressions, type SuppressionStats, } from './suppression-filter.js';
|
|
10
11
|
export { PRECISION_GATES, SCANNER_TIERS, tierOf, gateFor, passesPrecisionGate, type PrecisionTier, } from './precision-tiers.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,cAAc,EA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E,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,WAAW,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,WAAW,EACX,wBAAwB,EACxB,yBAAyB,EACzB,KAAK,gBAAgB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,eAAe,EACf,aAAa,EACb,MAAM,EACN,OAAO,EACP,mBAAmB,EACnB,KAAK,aAAa,GACnB,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export { loadConfig } from './config.js';
|
|
|
5
5
|
export { Orchestrator } from './orchestrator.js';
|
|
6
6
|
export { exec, commandExists, walkFiles, readFileSafe, clearWalkFilesCache, getChangedFiles } from './utils.js';
|
|
7
7
|
export { getVersion } from './version.js';
|
|
8
|
+
export { isTestFile } from './is-test-path.js';
|
|
8
9
|
export { parseSuppressions, isSuppressed, getUnusedSuppressions, getNakedSuppressions, } from './suppressions.js';
|
|
9
10
|
export { globToRegex, configSuppressionMatches, applyPipelineSuppressions, } from './suppression-filter.js';
|
|
10
11
|
export { PRECISION_GATES, SCANNER_TIERS, tierOf, gateFor, passesPrecisionGate, } from './precision-tiers.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,EAAE,UAAU,EAAwB,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAA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,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical test-file detection — returns true only for files that are
|
|
3
|
+
* unambiguously part of the test/mock/e2e infrastructure, so scanners
|
|
4
|
+
* can skip them without masking real vulnerabilities in legitimate
|
|
5
|
+
* production code.
|
|
6
|
+
*
|
|
7
|
+
* The predicate deliberately distinguishes between unambiguous
|
|
8
|
+
* test-framework conventions (which are safe to use as substring
|
|
9
|
+
* matches) and the ambiguous path substrings `/test/` and `/tests/`
|
|
10
|
+
* (which are NOT safe — `app/api/test/route.ts` is a legitimate
|
|
11
|
+
* Next.js App Router route-handler, not a test file).
|
|
12
|
+
*
|
|
13
|
+
* v0.16.3 D-CA-001 (2026-04-21) — Round-7 comprehensive-audit surfaced
|
|
14
|
+
* a systemic silent-skip class: 19 scanner files used
|
|
15
|
+
* `filePath.includes('/test/') || filePath.includes('/tests/')` as
|
|
16
|
+
* substring-match in their local isTestFile/shouldSkipFile helpers,
|
|
17
|
+
* silently skipping every file whose path contained either segment
|
|
18
|
+
* anywhere. Empirical RED-reproduction: identical source code under
|
|
19
|
+
* `src/app/api/test/route.ts` got 0 findings while the same source
|
|
20
|
+
* under `src/app/api/vuln/route.ts` got 6 findings — jwt-detector,
|
|
21
|
+
* taint-analyzer, tenant-isolation-checker, sql-concat-checker, and
|
|
22
|
+
* every other scanner silently no-oped on the `/test/` path. This
|
|
23
|
+
* helper closes that class by dropping the substring-match and keeping
|
|
24
|
+
* only the unambiguous conventions.
|
|
25
|
+
*
|
|
26
|
+
* Matches (returns true):
|
|
27
|
+
* - `.test.{ts,tsx,js,jsx,mjs,cjs}` file-name extension
|
|
28
|
+
* - `.spec.{ts,tsx,js,jsx,mjs,cjs}` file-name extension
|
|
29
|
+
* - `.e2e.{ts,tsx,js,jsx,mjs,cjs}` file-name extension
|
|
30
|
+
* - `__tests__/` directory segment anywhere in the path
|
|
31
|
+
* - `__mocks__/` directory segment anywhere in the path
|
|
32
|
+
* - `playwright/` directory segment (v0.6.1 console-checker extension)
|
|
33
|
+
* - `cypress/` directory segment (v0.6.1 console-checker extension)
|
|
34
|
+
* - `e2e/` directory segment (v0.6.1 console-checker extension)
|
|
35
|
+
*
|
|
36
|
+
* Does NOT match (returns false):
|
|
37
|
+
* - `app/api/test/route.ts` — legitimate Next.js route named "test"
|
|
38
|
+
* - `src/testing/utils.ts` — non-test utility with "test" in a dir-name
|
|
39
|
+
* - `src/components/TestButton.tsx` — legitimate component
|
|
40
|
+
* - `tests/helpers.ts` at top-level — no `.test.` extension and no
|
|
41
|
+
* `__tests__/` segment, so we defer to the scanner-specific
|
|
42
|
+
* judgment rather than silent-skip
|
|
43
|
+
*
|
|
44
|
+
* Path separators are normalized so the predicate works on both POSIX
|
|
45
|
+
* (`/`) and Windows (`\`) paths.
|
|
46
|
+
*/
|
|
47
|
+
export declare function isTestFile(filePath: string): boolean;
|
|
48
|
+
//# sourceMappingURL=is-test-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-test-path.d.ts","sourceRoot":"","sources":["../src/is-test-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAuBpD"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical test-file detection — returns true only for files that are
|
|
3
|
+
* unambiguously part of the test/mock/e2e infrastructure, so scanners
|
|
4
|
+
* can skip them without masking real vulnerabilities in legitimate
|
|
5
|
+
* production code.
|
|
6
|
+
*
|
|
7
|
+
* The predicate deliberately distinguishes between unambiguous
|
|
8
|
+
* test-framework conventions (which are safe to use as substring
|
|
9
|
+
* matches) and the ambiguous path substrings `/test/` and `/tests/`
|
|
10
|
+
* (which are NOT safe — `app/api/test/route.ts` is a legitimate
|
|
11
|
+
* Next.js App Router route-handler, not a test file).
|
|
12
|
+
*
|
|
13
|
+
* v0.16.3 D-CA-001 (2026-04-21) — Round-7 comprehensive-audit surfaced
|
|
14
|
+
* a systemic silent-skip class: 19 scanner files used
|
|
15
|
+
* `filePath.includes('/test/') || filePath.includes('/tests/')` as
|
|
16
|
+
* substring-match in their local isTestFile/shouldSkipFile helpers,
|
|
17
|
+
* silently skipping every file whose path contained either segment
|
|
18
|
+
* anywhere. Empirical RED-reproduction: identical source code under
|
|
19
|
+
* `src/app/api/test/route.ts` got 0 findings while the same source
|
|
20
|
+
* under `src/app/api/vuln/route.ts` got 6 findings — jwt-detector,
|
|
21
|
+
* taint-analyzer, tenant-isolation-checker, sql-concat-checker, and
|
|
22
|
+
* every other scanner silently no-oped on the `/test/` path. This
|
|
23
|
+
* helper closes that class by dropping the substring-match and keeping
|
|
24
|
+
* only the unambiguous conventions.
|
|
25
|
+
*
|
|
26
|
+
* Matches (returns true):
|
|
27
|
+
* - `.test.{ts,tsx,js,jsx,mjs,cjs}` file-name extension
|
|
28
|
+
* - `.spec.{ts,tsx,js,jsx,mjs,cjs}` file-name extension
|
|
29
|
+
* - `.e2e.{ts,tsx,js,jsx,mjs,cjs}` file-name extension
|
|
30
|
+
* - `__tests__/` directory segment anywhere in the path
|
|
31
|
+
* - `__mocks__/` directory segment anywhere in the path
|
|
32
|
+
* - `playwright/` directory segment (v0.6.1 console-checker extension)
|
|
33
|
+
* - `cypress/` directory segment (v0.6.1 console-checker extension)
|
|
34
|
+
* - `e2e/` directory segment (v0.6.1 console-checker extension)
|
|
35
|
+
*
|
|
36
|
+
* Does NOT match (returns false):
|
|
37
|
+
* - `app/api/test/route.ts` — legitimate Next.js route named "test"
|
|
38
|
+
* - `src/testing/utils.ts` — non-test utility with "test" in a dir-name
|
|
39
|
+
* - `src/components/TestButton.tsx` — legitimate component
|
|
40
|
+
* - `tests/helpers.ts` at top-level — no `.test.` extension and no
|
|
41
|
+
* `__tests__/` segment, so we defer to the scanner-specific
|
|
42
|
+
* judgment rather than silent-skip
|
|
43
|
+
*
|
|
44
|
+
* Path separators are normalized so the predicate works on both POSIX
|
|
45
|
+
* (`/`) and Windows (`\`) paths.
|
|
46
|
+
*/
|
|
47
|
+
export function isTestFile(filePath) {
|
|
48
|
+
// (1) Proper test-file extensions — `.test.ts`, `.spec.ts`, `.e2e.ts`, etc.
|
|
49
|
+
if (/\.(test|spec|e2e)\.(ts|tsx|js|jsx|mjs|cjs)$/.test(filePath))
|
|
50
|
+
return true;
|
|
51
|
+
// (2) Unambiguous test-framework directory conventions as path segments.
|
|
52
|
+
// `[\/\\]<name>[\/\\]` ensures we match a directory segment rather
|
|
53
|
+
// than a substring of a filename or a longer directory name.
|
|
54
|
+
if (/[\/\\]__tests__[\/\\]/.test(filePath))
|
|
55
|
+
return true;
|
|
56
|
+
if (/[\/\\]__mocks__[\/\\]/.test(filePath))
|
|
57
|
+
return true;
|
|
58
|
+
// (3) E2E-framework directory conventions (v0.6.1 console-checker
|
|
59
|
+
// extension — dogfood on cal-com and dub found 44 of 46
|
|
60
|
+
// console-checker FPs in `apps/web/playwright/**` with unit-test-
|
|
61
|
+
// conventions-only matching; keeping these as unambiguous skips
|
|
62
|
+
// preserves that trade-off).
|
|
63
|
+
if (/[\/\\]playwright[\/\\]/.test(filePath))
|
|
64
|
+
return true;
|
|
65
|
+
if (/[\/\\]cypress[\/\\]/.test(filePath))
|
|
66
|
+
return true;
|
|
67
|
+
if (/[\/\\]e2e[\/\\]/.test(filePath))
|
|
68
|
+
return true;
|
|
69
|
+
// Deliberately NOT `/test/` or `/tests/` substring — legitimate
|
|
70
|
+
// routes/directories (app/api/test/route.ts, src/testing/utils.ts,
|
|
71
|
+
// …) must be scanned. D-CA-001 fix (2026-04-21).
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=is-test-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-test-path.js","sourceRoot":"","sources":["../src/is-test-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,4EAA4E;IAC5E,IAAI,6CAA6C,CAAC,IAAI,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IAE9E,yEAAyE;IACzE,uEAAuE;IACvE,iEAAiE;IACjE,IAAI,uBAAuB,CAAC,IAAI,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IACxD,IAAI,uBAAuB,CAAC,IAAI,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IAExD,kEAAkE;IAClE,4DAA4D;IAC5D,sEAAsE;IACtE,oEAAoE;IACpE,iCAAiC;IACjC,IAAI,wBAAwB,CAAC,IAAI,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IACzD,IAAI,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IACtD,IAAI,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IAElD,gEAAgE;IAChE,mEAAmE;IACnE,iDAAiD;IACjD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aegis-scan/core",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.3",
|
|
4
4
|
"description": "AEGIS core engine — orchestrator, scoring (0-1000), config loader with Zod-strict schema, suppression filter, shared types + utilities. The foundation of the AEGIS security-scanner suite for Next.js + Supabase.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "RideMatch1 <230386010+RideMatch1@users.noreply.github.com>",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "tsc",
|
|
58
|
+
"lint": "tsc --noEmit",
|
|
58
59
|
"test": "vitest run",
|
|
59
60
|
"clean": "rm -rf dist"
|
|
60
61
|
}
|