devarmor 1.0.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.
Files changed (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +35 -0
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +140 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/index.d.ts +3 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +13 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/modules/agent-residue.d.ts +11 -0
  12. package/dist/modules/agent-residue.d.ts.map +1 -0
  13. package/dist/modules/agent-residue.js +283 -0
  14. package/dist/modules/agent-residue.js.map +1 -0
  15. package/dist/modules/mcp-auditor.d.ts +12 -0
  16. package/dist/modules/mcp-auditor.d.ts.map +1 -0
  17. package/dist/modules/mcp-auditor.js +290 -0
  18. package/dist/modules/mcp-auditor.js.map +1 -0
  19. package/dist/modules/posture-checker.d.ts +11 -0
  20. package/dist/modules/posture-checker.d.ts.map +1 -0
  21. package/dist/modules/posture-checker.js +315 -0
  22. package/dist/modules/posture-checker.js.map +1 -0
  23. package/dist/modules/secret-scanner.d.ts +11 -0
  24. package/dist/modules/secret-scanner.d.ts.map +1 -0
  25. package/dist/modules/secret-scanner.js +321 -0
  26. package/dist/modules/secret-scanner.js.map +1 -0
  27. package/dist/modules/skill-scanner.d.ts +12 -0
  28. package/dist/modules/skill-scanner.d.ts.map +1 -0
  29. package/dist/modules/skill-scanner.js +294 -0
  30. package/dist/modules/skill-scanner.js.map +1 -0
  31. package/dist/report/html.d.ts +6 -0
  32. package/dist/report/html.d.ts.map +1 -0
  33. package/dist/report/html.js +116 -0
  34. package/dist/report/html.js.map +1 -0
  35. package/dist/report/json.d.ts +9 -0
  36. package/dist/report/json.d.ts.map +1 -0
  37. package/dist/report/json.js +69 -0
  38. package/dist/report/json.js.map +1 -0
  39. package/dist/report/terminal.d.ts +6 -0
  40. package/dist/report/terminal.d.ts.map +1 -0
  41. package/dist/report/terminal.js +162 -0
  42. package/dist/report/terminal.js.map +1 -0
  43. package/dist/scanner.d.ts +9 -0
  44. package/dist/scanner.d.ts.map +1 -0
  45. package/dist/scanner.js +145 -0
  46. package/dist/scanner.js.map +1 -0
  47. package/dist/types.d.ts +91 -0
  48. package/dist/types.d.ts.map +1 -0
  49. package/dist/types.js +17 -0
  50. package/dist/types.js.map +1 -0
  51. package/package.json +50 -0
@@ -0,0 +1,91 @@
1
+ /** Severity levels for scan findings, ordered by criticality. */
2
+ export declare enum Severity {
3
+ CRITICAL = "CRITICAL",
4
+ HIGH = "HIGH",
5
+ MEDIUM = "MEDIUM",
6
+ LOW = "LOW",
7
+ INFO = "INFO"
8
+ }
9
+ /** A single security finding discovered during a scan. */
10
+ export interface ScanFinding {
11
+ /** Which scanner module produced this finding. */
12
+ module: ModuleName;
13
+ /** Severity of the finding. */
14
+ severity: Severity;
15
+ /** Human-readable title. */
16
+ title: string;
17
+ /** Detailed description of the issue. */
18
+ description: string;
19
+ /** Absolute file path where the issue was found (if applicable). */
20
+ filePath?: string;
21
+ /** Line number within the file (if applicable). */
22
+ line?: number;
23
+ /** The matched content snippet (redacted if sensitive). */
24
+ evidence?: string;
25
+ /** Suggested remediation action. */
26
+ remediation?: string;
27
+ }
28
+ /** Names of all scanner modules. */
29
+ export type ModuleName = 'SecretScanner' | 'AgentResidueScanner' | 'MCPAuditor' | 'SkillScanner' | 'PostureChecker';
30
+ /** Result returned by each scanner module after execution. */
31
+ export interface ModuleResult {
32
+ /** Module identifier. */
33
+ module: ModuleName;
34
+ /** Human-readable module label. */
35
+ label: string;
36
+ /** Whether the module ran successfully. */
37
+ success: boolean;
38
+ /** Time taken in milliseconds. */
39
+ durationMs: number;
40
+ /** Number of files/items scanned. */
41
+ itemsScanned: number;
42
+ /** All findings from this module. */
43
+ findings: ScanFinding[];
44
+ /** Optional error message if the module failed. */
45
+ error?: string;
46
+ }
47
+ /** Overall scan report aggregating all module results. */
48
+ export interface ScanReport {
49
+ /** Timestamp when the scan started. */
50
+ timestamp: string;
51
+ /** Root path that was scanned. */
52
+ scanPath: string;
53
+ /** DevArmor version. */
54
+ version: string;
55
+ /** Total scan duration in milliseconds. */
56
+ totalDurationMs: number;
57
+ /** Results from each module. */
58
+ modules: ModuleResult[];
59
+ /** Aggregated summary counts. */
60
+ summary: {
61
+ totalFindings: number;
62
+ critical: number;
63
+ high: number;
64
+ medium: number;
65
+ low: number;
66
+ info: number;
67
+ };
68
+ }
69
+ /** Configuration options for the scan command. */
70
+ export interface ScanOptions {
71
+ /** Root directory to scan. */
72
+ path: string;
73
+ /** Report output format. */
74
+ report: 'terminal' | 'html' | 'json';
75
+ /** Whether to attempt auto-fix for certain issues. */
76
+ fix: boolean;
77
+ /** Specific modules to run (empty = all). */
78
+ modules: ModuleName[];
79
+ /** Verbose logging. */
80
+ verbose: boolean;
81
+ }
82
+ /** Interface that all scanner modules must implement. */
83
+ export interface ScannerModule {
84
+ /** Module name identifier. */
85
+ name: ModuleName;
86
+ /** Human-readable label. */
87
+ label: string;
88
+ /** Run the scan and return results. */
89
+ scan(options: ScanOptions): Promise<ModuleResult>;
90
+ }
91
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAKA,iEAAiE;AACjE,oBAAY,QAAQ;IAClB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AAED,0DAA0D;AAC1D,MAAM,WAAW,WAAW;IAC1B,kDAAkD;IAClD,MAAM,EAAE,UAAU,CAAC;IACnB,+BAA+B;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,QAAQ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AAM,CAAC;IACb,4BAA4B;IAC5B,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;IACrC,sDAAsD;IACtD,GAAG,EAAE,OAAO,CAAC;IACb,6CAA6C;IAC7C,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,uBAAuB;IACvB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,yDAAyD;AACzD,MAAM,WAAW,aAAa;IAC5B,8BAA8B;IAC9B,IAAI,EAAE,UAAU,CAAC;IACjB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACnD"}
package/dist/types.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // ============================================================
3
+ // DevArmor — Shared Types
4
+ // One CLI command to secure your AI-powered developer workstation.
5
+ // ============================================================
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Severity = void 0;
8
+ /** Severity levels for scan findings, ordered by criticality. */
9
+ var Severity;
10
+ (function (Severity) {
11
+ Severity["CRITICAL"] = "CRITICAL";
12
+ Severity["HIGH"] = "HIGH";
13
+ Severity["MEDIUM"] = "MEDIUM";
14
+ Severity["LOW"] = "LOW";
15
+ Severity["INFO"] = "INFO";
16
+ })(Severity || (exports.Severity = Severity = {}));
17
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,0BAA0B;AAC1B,mEAAmE;AACnE,+DAA+D;;;AAE/D,iEAAiE;AACjE,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,iCAAqB,CAAA;IACrB,yBAAa,CAAA;IACb,6BAAiB,CAAA;IACjB,uBAAW,CAAA;IACX,yBAAa,CAAA;AACf,CAAC,EANW,QAAQ,wBAAR,QAAQ,QAMnB"}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "devarmor",
3
+ "version": "1.0.0",
4
+ "description": "One CLI command to secure your entire AI-powered developer workstation.",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "devarmor": "dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "README.md",
12
+ "LICENSE"
13
+ ],
14
+ "scripts": {
15
+ "build": "tsc",
16
+ "dev": "tsc --watch",
17
+ "start": "node dist/index.js",
18
+ "test": "jest --verbose",
19
+ "lint": "tsc --noEmit",
20
+ "prepublishOnly": "npm run build"
21
+ },
22
+ "keywords": [
23
+ "security",
24
+ "developer-tools",
25
+ "ai-agent",
26
+ "secret-scanner",
27
+ "mcp",
28
+ "workstation-security",
29
+ "devarmor",
30
+ "cli"
31
+ ],
32
+ "author": "",
33
+ "license": "MIT",
34
+ "dependencies": {
35
+ "chalk": "^5.3.0",
36
+ "commander": "^12.1.0",
37
+ "glob": "^11.0.0",
38
+ "ora": "^8.1.0"
39
+ },
40
+ "devDependencies": {
41
+ "@types/jest": "^29.5.12",
42
+ "@types/node": "^22.10.0",
43
+ "jest": "^29.7.0",
44
+ "ts-jest": "^29.2.0",
45
+ "typescript": "^5.6.0"
46
+ },
47
+ "engines": {
48
+ "node": ">=18.0.0"
49
+ }
50
+ }