flagrix 0.1.4 → 0.3.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/dist/cli.js
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
EXIT,
|
|
4
4
|
describeSource,
|
|
5
5
|
exitCodeFor,
|
|
6
|
+
loadOsvFeed,
|
|
6
7
|
loadSignatures,
|
|
7
8
|
parseRepoTarget,
|
|
8
9
|
renderRepoResult,
|
|
@@ -11,7 +12,7 @@ import {
|
|
|
11
12
|
scanGitHubRepo,
|
|
12
13
|
scanGitHubUser,
|
|
13
14
|
wantJson
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-34LISSSS.js";
|
|
15
16
|
|
|
16
17
|
// src/cli.ts
|
|
17
18
|
import { parseArgs } from "util";
|
|
@@ -29,10 +30,12 @@ async function runScan(target, options) {
|
|
|
29
30
|
const loaded = await loadSignatures();
|
|
30
31
|
const note = describeSource(loaded);
|
|
31
32
|
if (note) console.error(`flagrix: ${note}`);
|
|
32
|
-
const
|
|
33
|
+
const scanOptions = {
|
|
33
34
|
signatures: loaded.signatures,
|
|
34
|
-
githubToken: resolveToken(options.token)
|
|
35
|
-
|
|
35
|
+
githubToken: resolveToken(options.token),
|
|
36
|
+
osvFeed: await loadOsvFeed()
|
|
37
|
+
};
|
|
38
|
+
const result = await scanGitHubRepo(repo, scanOptions);
|
|
36
39
|
if (wantJson(options.json)) {
|
|
37
40
|
console.log(JSON.stringify(result, null, 2));
|
|
38
41
|
} else {
|
|
@@ -132,7 +135,7 @@ async function main() {
|
|
|
132
135
|
}
|
|
133
136
|
return runScanUser(target, { json: values.json, token: values.token });
|
|
134
137
|
case "mcp": {
|
|
135
|
-
const { runMcp } = await import("./mcp-
|
|
138
|
+
const { runMcp } = await import("./mcp-7CQFVW5O.js");
|
|
136
139
|
return runMcp();
|
|
137
140
|
}
|
|
138
141
|
default:
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
describeSource,
|
|
4
|
+
loadOsvFeed,
|
|
4
5
|
loadSignatures,
|
|
5
6
|
parseRepoTarget,
|
|
6
7
|
resolveToken,
|
|
7
8
|
scanGitHubRepo,
|
|
8
9
|
scanGitHubUser,
|
|
9
10
|
securityScore
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-34LISSSS.js";
|
|
11
12
|
|
|
12
13
|
// src/commands/mcp.ts
|
|
13
14
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -33,10 +34,12 @@ async function runMcp() {
|
|
|
33
34
|
async ({ target, ref }) => {
|
|
34
35
|
const repo = parseRepoTarget(target, ref);
|
|
35
36
|
const loaded = await loadSignatures();
|
|
36
|
-
const
|
|
37
|
+
const scanOptions = {
|
|
37
38
|
signatures: loaded.signatures,
|
|
38
|
-
githubToken: resolveToken()
|
|
39
|
-
|
|
39
|
+
githubToken: resolveToken(),
|
|
40
|
+
osvFeed: await loadOsvFeed()
|
|
41
|
+
};
|
|
42
|
+
const result = await scanGitHubRepo(repo, scanOptions);
|
|
40
43
|
const note = describeSource(loaded);
|
|
41
44
|
const summary = [
|
|
42
45
|
`${result.riskLevel.toUpperCase()} risk \u2014 security score ${securityScore(result.riskScore)}/100 (verdict pinned to commit ${result.commitSha ?? "unknown"}).`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flagrix",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Scan GitHub repos and profiles for malware before you clone — CLI and MCP server for the Flagrix scanner",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"zod": "^3.24.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@flagrix/scanner-core": "^0.
|
|
56
|
+
"@flagrix/scanner-core": "^0.5.0",
|
|
57
57
|
"@types/node": "^20.0.0",
|
|
58
58
|
"tsup": "^8.0.0",
|
|
59
59
|
"typescript": "^5.0.0",
|