driftdetect 0.4.0 → 0.4.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/LICENSE +21 -0
- package/dist/bin/drift.js +10 -1
- package/dist/bin/drift.js.map +1 -1
- package/dist/commands/callgraph.d.ts +24 -0
- package/dist/commands/callgraph.d.ts.map +1 -0
- package/dist/commands/callgraph.js +1376 -0
- package/dist/commands/callgraph.js.map +1 -0
- package/dist/commands/index.d.ts +24 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +2 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +50 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/projects.d.ts +17 -0
- package/dist/commands/projects.d.ts.map +1 -0
- package/dist/commands/projects.js +400 -0
- package/dist/commands/projects.js.map +1 -0
- package/dist/commands/scan.d.ts.map +1 -1
- package/dist/commands/scan.js +34 -1
- package/dist/commands/scan.js.map +1 -1
- package/package.json +17 -17
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Geoffrey Fernald
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/bin/drift.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { Command } from 'commander';
|
|
11
11
|
import { VERSION } from '../index.js';
|
|
12
|
-
import { initCommand, scanCommand, checkCommand, statusCommand, approveCommand, ignoreCommand, reportCommand, exportCommand, whereCommand, filesCommand, watchCommand, dashboardCommand, trendsCommand, parserCommand, dnaCommand, boundariesCommand, } from '../commands/index.js';
|
|
12
|
+
import { initCommand, scanCommand, checkCommand, statusCommand, approveCommand, ignoreCommand, reportCommand, exportCommand, whereCommand, filesCommand, watchCommand, dashboardCommand, trendsCommand, parserCommand, dnaCommand, boundariesCommand, callgraphCommand, projectsCommand, } from '../commands/index.js';
|
|
13
13
|
/**
|
|
14
14
|
* Create and configure the main CLI program
|
|
15
15
|
*/
|
|
@@ -38,6 +38,8 @@ function createProgram() {
|
|
|
38
38
|
program.addCommand(parserCommand);
|
|
39
39
|
program.addCommand(dnaCommand);
|
|
40
40
|
program.addCommand(boundariesCommand);
|
|
41
|
+
program.addCommand(callgraphCommand);
|
|
42
|
+
program.addCommand(projectsCommand);
|
|
41
43
|
// Add help examples
|
|
42
44
|
program.addHelpText('after', `
|
|
43
45
|
Examples:
|
|
@@ -72,6 +74,13 @@ Examples:
|
|
|
72
74
|
$ drift boundaries Show data access boundaries
|
|
73
75
|
$ drift boundaries tables List discovered tables
|
|
74
76
|
$ drift boundaries check Check for boundary violations
|
|
77
|
+
$ drift callgraph Show call graph status
|
|
78
|
+
$ drift callgraph build Build call graph from source
|
|
79
|
+
$ drift callgraph reach <loc> What data can this code reach?
|
|
80
|
+
$ drift callgraph inverse <tbl> Who can reach this data?
|
|
81
|
+
$ drift projects List all registered projects
|
|
82
|
+
$ drift projects switch <name> Switch active project
|
|
83
|
+
$ drift projects info Show current project details
|
|
75
84
|
|
|
76
85
|
Documentation:
|
|
77
86
|
https://github.com/drift/drift
|
package/dist/bin/drift.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drift.js","sourceRoot":"","sources":["../../src/bin/drift.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,aAAa,EACb,cAAc,EACd,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,UAAU,EACV,iBAAiB,
|
|
1
|
+
{"version":3,"file":"drift.js","sourceRoot":"","sources":["../../src/bin/drift.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,aAAa,EACb,cAAc,EACd,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAE9B;;GAEG;AACH,SAAS,aAAa;IACpB,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAE9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CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,IAAI;IACjB,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;IAEhC,IAAI,CAAC;QACH,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACzC,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;gBACzB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,cAAc;AACd,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Call Graph Command - drift callgraph
|
|
3
|
+
*
|
|
4
|
+
* Build and query call graphs to understand code reachability.
|
|
5
|
+
* Answers: "What data can this code access?" and "Who can reach this data?"
|
|
6
|
+
*
|
|
7
|
+
* @requirements Call Graph Feature
|
|
8
|
+
*/
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
export interface CallGraphOptions {
|
|
11
|
+
/** Output format */
|
|
12
|
+
format?: 'text' | 'json';
|
|
13
|
+
/** Enable verbose output */
|
|
14
|
+
verbose?: boolean;
|
|
15
|
+
/** Maximum depth for reachability queries */
|
|
16
|
+
maxDepth?: number;
|
|
17
|
+
/** Show security-prioritized view */
|
|
18
|
+
security?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Create the callgraph command with subcommands
|
|
22
|
+
*/
|
|
23
|
+
export declare const callgraphCommand: Command;
|
|
24
|
+
//# sourceMappingURL=callgraph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callgraph.d.ts","sourceRoot":"","sources":["../../src/commands/callgraph.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBpC,MAAM,WAAW,gBAAgB;IAC/B,oBAAoB;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAs6CD;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAGN,CAAC"}
|