auditor-lambda 0.3.9 → 0.3.11
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/dispatch/lens-definitions.json +8 -0
- package/dist/extractors/fileInventory.js +1450 -17
- package/dist/orchestrator/autoFixExecutor.js +22 -20
- package/dist/orchestrator/unitBuilder.js +4 -3
- package/dist/types.d.ts +1 -1
- package/dist/validation/auditResults.js +1 -0
- package/package.json +3 -1
- package/schemas/audit_result.schema.json +1 -1
- package/schemas/audit_task.schema.json +1 -1
- package/schemas/coverage_matrix.schema.json +2 -2
- package/schemas/finding.schema.json +2 -1
- package/schemas/flow_coverage.schema.json +2 -2
- package/schemas/unit_manifest.schema.json +1 -1
|
@@ -19,51 +19,53 @@ export function runAutoFixExecutor(bundle, root) {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
const executedTools = [];
|
|
22
|
-
// TS
|
|
22
|
+
// JS, TS, HTML, CSS, JSON, YAML, MD
|
|
23
23
|
if (extensions.has("ts") ||
|
|
24
24
|
extensions.has("js") ||
|
|
25
25
|
extensions.has("tsx") ||
|
|
26
|
-
extensions.has("jsx")
|
|
26
|
+
extensions.has("jsx") ||
|
|
27
|
+
extensions.has("html") ||
|
|
28
|
+
extensions.has("css") ||
|
|
29
|
+
extensions.has("json") ||
|
|
30
|
+
extensions.has("yml") ||
|
|
31
|
+
extensions.has("yaml") ||
|
|
32
|
+
extensions.has("md")) {
|
|
27
33
|
if (tryRunConfiguredFormatter(root, [
|
|
28
34
|
...resolveNodeTool(root, join("node_modules", "prettier", "bin", "prettier.cjs"), ["--write", "."], "prettier --write ."),
|
|
29
35
|
{ command: "prettier", args: ["--write", "."], display: "prettier --write ." },
|
|
30
|
-
|
|
36
|
+
{ command: "npx", args: ["--yes", "prettier", "--write", "."], display: "npx --yes prettier --write ." },
|
|
37
|
+
])) {
|
|
31
38
|
executedTools.push("prettier");
|
|
32
|
-
|
|
33
|
-
...resolveNodeTool(root, join("node_modules", "eslint", "bin", "eslint.js"), ["--fix", "."], "eslint --fix ."),
|
|
34
|
-
{ command: "eslint", args: ["--fix", "."], display: "eslint --fix ." },
|
|
35
|
-
]))
|
|
36
|
-
executedTools.push("eslint");
|
|
39
|
+
}
|
|
37
40
|
}
|
|
38
41
|
// Python
|
|
39
42
|
if (extensions.has("py")) {
|
|
40
43
|
if (tryRunConfiguredFormatter(root, [
|
|
41
44
|
{ command: "black", args: ["."], display: "black ." },
|
|
42
45
|
{ command: "python", args: ["-m", "black", "."], display: "python -m black ." },
|
|
46
|
+
{ command: "uvx", args: ["black", "."], display: "uvx black ." },
|
|
47
|
+
{ command: "pipx", args: ["run", "black", "."], display: "pipx run black ." },
|
|
43
48
|
])) {
|
|
44
49
|
executedTools.push("black");
|
|
45
50
|
}
|
|
51
|
+
}
|
|
52
|
+
// SQL
|
|
53
|
+
if (extensions.has("sql")) {
|
|
46
54
|
if (tryRunConfiguredFormatter(root, [
|
|
47
|
-
{
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
display: "autopep8 --in-place --recursive .",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
command: "python",
|
|
54
|
-
args: ["-m", "autopep8", "--in-place", "--recursive", "."],
|
|
55
|
-
display: "python -m autopep8 --in-place --recursive .",
|
|
56
|
-
},
|
|
55
|
+
{ command: "sqlfluff", args: ["fix", "--force", "."], display: "sqlfluff fix --force ." },
|
|
56
|
+
{ command: "uvx", args: ["sqlfluff", "fix", "--force", "."], display: "uvx sqlfluff fix --force ." },
|
|
57
|
+
{ command: "pipx", args: ["run", "sqlfluff", "fix", "--force", "."], display: "pipx run sqlfluff fix --force ." },
|
|
57
58
|
])) {
|
|
58
|
-
executedTools.push("
|
|
59
|
+
executedTools.push("sqlfluff");
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
// Go
|
|
62
63
|
if (extensions.has("go")) {
|
|
63
64
|
if (tryRunConfiguredFormatter(root, [
|
|
64
65
|
{ command: "gofmt", args: ["-w", "."], display: "gofmt -w ." },
|
|
65
|
-
]))
|
|
66
|
+
])) {
|
|
66
67
|
executedTools.push("gofmt");
|
|
68
|
+
}
|
|
67
69
|
}
|
|
68
70
|
const resultsArtifact = {
|
|
69
71
|
executed_tools: executedTools,
|
|
@@ -2,11 +2,11 @@ import { bucketFile } from "../extractors/bucketing.js";
|
|
|
2
2
|
import { isAuditExcludedStatus } from "../extractors/disposition.js";
|
|
3
3
|
import { pathTokens, normalizeExtractorPath } from "../extractors/pathPatterns.js";
|
|
4
4
|
const LENS_MAP = {
|
|
5
|
-
runtime: ["correctness", "maintainability", "tests"],
|
|
6
|
-
interface: ["correctness", "security", "reliability", "tests"],
|
|
5
|
+
runtime: ["correctness", "maintainability", "tests", "observability"],
|
|
6
|
+
interface: ["correctness", "security", "reliability", "tests", "observability"],
|
|
7
7
|
data_layer: ["correctness", "data_integrity", "reliability", "tests"],
|
|
8
8
|
security_sensitive: ["security", "correctness", "reliability", "tests"],
|
|
9
|
-
concurrency_state: ["reliability", "performance", "correctness", "tests"],
|
|
9
|
+
concurrency_state: ["reliability", "performance", "correctness", "tests", "observability"],
|
|
10
10
|
tests: ["tests", "maintainability"],
|
|
11
11
|
tooling_scripts: ["correctness", "operability", "config_deployment"],
|
|
12
12
|
config_deployment: ["config_deployment", "reliability", "operability"],
|
|
@@ -76,6 +76,7 @@ export const LENS_ORDER = [
|
|
|
76
76
|
"performance",
|
|
77
77
|
"operability",
|
|
78
78
|
"config_deployment",
|
|
79
|
+
"observability",
|
|
79
80
|
"maintainability",
|
|
80
81
|
"tests",
|
|
81
82
|
];
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type Lens = "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment";
|
|
1
|
+
export type Lens = "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
2
2
|
export interface FileRecord {
|
|
3
3
|
path: string;
|
|
4
4
|
language: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auditor-lambda",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Portable hybrid code-auditing framework for arbitrary repositories.",
|
|
6
6
|
"type": "module",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
22
|
"postinstall": "node scripts/postinstall.mjs",
|
|
23
|
+
"update-languages": "node scripts/update-languages.mjs",
|
|
23
24
|
"build": "tsc -p tsconfig.json",
|
|
24
25
|
"check": "tsc -p tsconfig.json --noEmit",
|
|
25
26
|
"test": "npm run build && node --test tests/*.test.mjs",
|
|
@@ -67,6 +68,7 @@
|
|
|
67
68
|
"devDependencies": {
|
|
68
69
|
"@types/node": "^24.3.0",
|
|
69
70
|
"ajv": "^8.17.1",
|
|
71
|
+
"linguist-languages": "^9.3.2",
|
|
70
72
|
"typescript": "^5.9.2"
|
|
71
73
|
}
|
|
72
74
|
}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"pass_id": { "type": "string" },
|
|
26
26
|
"lens": {
|
|
27
27
|
"type": "string",
|
|
28
|
-
"enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment"]
|
|
28
|
+
"enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]
|
|
29
29
|
},
|
|
30
30
|
"agent_role": { "type": "string" },
|
|
31
31
|
"file_coverage": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"pass_id": { "type": "string" },
|
|
18
18
|
"lens": {
|
|
19
19
|
"type": "string",
|
|
20
|
-
"enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment"]
|
|
20
|
+
"enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]
|
|
21
21
|
},
|
|
22
22
|
"file_paths": {
|
|
23
23
|
"type": "array",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"type": "array",
|
|
29
29
|
"items": {
|
|
30
30
|
"type": "string",
|
|
31
|
-
"enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment"]
|
|
31
|
+
"enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"completed_lenses": {
|
|
35
35
|
"type": "array",
|
|
36
36
|
"items": {
|
|
37
37
|
"type": "string",
|
|
38
|
-
"enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment"]
|
|
38
|
+
"enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
},
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"type": "array",
|
|
27
27
|
"items": {
|
|
28
28
|
"type": "string",
|
|
29
|
-
"enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment"]
|
|
29
|
+
"enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"completed_lenses": {
|
|
33
33
|
"type": "array",
|
|
34
34
|
"items": {
|
|
35
35
|
"type": "string",
|
|
36
|
-
"enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment"]
|
|
36
|
+
"enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"status": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"minItems": 1,
|
|
29
29
|
"items": {
|
|
30
30
|
"type": "string",
|
|
31
|
-
"enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment"]
|
|
31
|
+
"enum": ["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"critical_flows": {
|