corgea-cli 1.8.8__tar.gz → 1.9.1__tar.gz
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.
- corgea_cli-1.9.1/.codex/hooks.json +14 -0
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/.github/workflows/npm-publish.yml +1 -1
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/.github/workflows/release-binaries.yml +1 -1
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/.github/workflows/release.yml +39 -4
- corgea_cli-1.9.1/.github/workflows/staging-contract.yml +34 -0
- corgea_cli-1.9.1/.github/workflows/test.yml +33 -0
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/.github/workflows/update_docs..yml +1 -1
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/.gitignore +4 -0
- corgea_cli-1.9.1/AGENTS.md +24 -0
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/Cargo.lock +124 -1
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/Cargo.toml +19 -1
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/PKG-INFO +1 -1
- corgea_cli-1.9.1/README.md +130 -0
- corgea_cli-1.9.1/RELEASING.md +127 -0
- corgea_cli-1.9.1/examples/deps_skill.rs +31 -0
- corgea_cli-1.9.1/harness +357 -0
- corgea_cli-1.9.1/skills/corgea/SKILL.md +307 -0
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/authorize.rs +84 -58
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/cicd.rs +3 -4
- corgea_cli-1.9.1/src/config.rs +217 -0
- corgea_cli-1.9.1/src/deps/detect.rs +103 -0
- corgea_cli-1.9.1/src/deps/diff.rs +151 -0
- corgea_cli-1.9.1/src/deps/ecosystems/evaluate.rs +304 -0
- corgea_cli-1.9.1/src/deps/ecosystems/maven.rs +247 -0
- corgea_cli-1.9.1/src/deps/ecosystems/mod.rs +139 -0
- corgea_cli-1.9.1/src/deps/ecosystems/npm.rs +354 -0
- corgea_cli-1.9.1/src/deps/ecosystems/pypi.rs +474 -0
- corgea_cli-1.9.1/src/deps/explain.rs +82 -0
- corgea_cli-1.9.1/src/deps/findings.rs +38 -0
- corgea_cli-1.9.1/src/deps/mod.rs +95 -0
- corgea_cli-1.9.1/src/deps/model.rs +239 -0
- corgea_cli-1.9.1/src/deps/parse/mod.rs +4 -0
- corgea_cli-1.9.1/src/deps/parse/npm_lock.rs +10 -0
- corgea_cli-1.9.1/src/deps/parse/python_lock.rs +10 -0
- corgea_cli-1.9.1/src/deps/policy.rs +92 -0
- corgea_cli-1.9.1/src/deps/report.rs +172 -0
- corgea_cli-1.9.1/src/deps/run.rs +872 -0
- corgea_cli-1.9.1/src/deps/skill.rs +185 -0
- corgea_cli-1.9.1/src/deps/tests/common.rs +15 -0
- corgea_cli-1.9.1/src/deps/tests/correctness_tests.rs +46 -0
- corgea_cli-1.9.1/src/deps/tests/detect_tests.rs +50 -0
- corgea_cli-1.9.1/src/deps/tests/diff_tests.rs +132 -0
- corgea_cli-1.9.1/src/deps/tests/explain_tests.rs +20 -0
- corgea_cli-1.9.1/src/deps/tests/findings_tests.rs +25 -0
- corgea_cli-1.9.1/src/deps/tests/maven_tests.rs +129 -0
- corgea_cli-1.9.1/src/deps/tests/mod.rs +13 -0
- corgea_cli-1.9.1/src/deps/tests/npm_tests.rs +350 -0
- corgea_cli-1.9.1/src/deps/tests/policy_tests.rs +44 -0
- corgea_cli-1.9.1/src/deps/tests/pypi_tests.rs +183 -0
- corgea_cli-1.9.1/src/deps/tests/report_tests.rs +29 -0
- corgea_cli-1.9.1/src/deps/tests/robustness_tests.rs +105 -0
- corgea_cli-1.9.1/src/deps/tests/slice0_tests.rs +16 -0
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/inspect.rs +53 -34
- corgea_cli-1.9.1/src/lib.rs +13 -0
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/list.rs +117 -77
- corgea_cli-1.9.1/src/log.rs +8 -0
- corgea_cli-1.9.1/src/main.rs +737 -0
- corgea_cli-1.9.1/src/precheck/detect.rs +493 -0
- corgea_cli-1.9.1/src/precheck/exec.rs +83 -0
- corgea_cli-1.9.1/src/precheck/mod.rs +1367 -0
- corgea_cli-1.9.1/src/precheck/parse.rs +1616 -0
- corgea_cli-1.9.1/src/precheck/render.rs +734 -0
- corgea_cli-1.9.1/src/precheck/test_support.rs +108 -0
- corgea_cli-1.9.1/src/precheck/tree.rs +948 -0
- corgea_cli-1.9.1/src/precheck/uv.rs +333 -0
- corgea_cli-1.9.1/src/precheck/verdict.rs +856 -0
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/scan.rs +154 -93
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/scanners/blast.rs +219 -158
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/scanners/fortify.rs +17 -8
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/scanners/parsers/checkmarx.rs +25 -16
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/scanners/parsers/coverity.rs +32 -12
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/scanners/parsers/mod.rs +7 -6
- corgea_cli-1.9.1/src/scanners/parsers/sarif.rs +121 -0
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/scanners/parsers/semgrep.rs +7 -7
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/setup_hooks.rs +25 -16
- corgea_cli-1.9.1/src/skill.rs +367 -0
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/targets.rs +283 -83
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/utils/api.rs +444 -212
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/utils/generic.rs +106 -36
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/utils/terminal.rs +65 -35
- corgea_cli-1.9.1/src/verify_deps/mod.rs +47 -0
- corgea_cli-1.9.1/src/verify_deps/registry.rs +997 -0
- corgea_cli-1.9.1/src/vuln_api/mod.rs +853 -0
- corgea_cli-1.9.1/src/vuln_api_stub/mod.rs +352 -0
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/src/wait.rs +28 -22
- corgea_cli-1.9.1/tests/cli_bare_install.rs +383 -0
- corgea_cli-1.9.1/tests/cli_deps.rs +920 -0
- corgea_cli-1.9.1/tests/cli_deps_skill.rs +10 -0
- corgea_cli-1.9.1/tests/cli_exec_fallback.rs +111 -0
- corgea_cli-1.9.1/tests/cli_install.rs +899 -0
- corgea_cli-1.9.1/tests/cli_npm_ci.rs +421 -0
- corgea_cli-1.9.1/tests/cli_provenance.rs +248 -0
- corgea_cli-1.9.1/tests/cli_remediation.rs +119 -0
- corgea_cli-1.9.1/tests/cli_tree.rs +497 -0
- corgea_cli-1.9.1/tests/cli_uv_sync.rs +361 -0
- corgea_cli-1.9.1/tests/cli_verdict.rs +372 -0
- corgea_cli-1.9.1/tests/common/mod.rs +435 -0
- corgea_cli-1.9.1/tests/fixtures/README.md +23 -0
- corgea_cli-1.9.1/tests/fixtures/go-mod-smoke/go.mod +5 -0
- corgea_cli-1.9.1/tests/fixtures/go-mod-smoke/go.sum +2 -0
- corgea_cli-1.9.1/tests/fixtures/java-gradle/build.gradle +10 -0
- corgea_cli-1.9.1/tests/fixtures/java-gradle/gradle.lockfile +6 -0
- corgea_cli-1.9.1/tests/fixtures/java-maven/pom.xml +35 -0
- corgea_cli-1.9.1/tests/fixtures/malformed/not-xml-pom.xml +1 -0
- corgea_cli-1.9.1/tests/fixtures/malformed/package-lock.json +6 -0
- corgea_cli-1.9.1/tests/fixtures/malformed/package.json +4 -0
- corgea_cli-1.9.1/tests/fixtures/malformed/poetry.lock +3 -0
- corgea_cli-1.9.1/tests/fixtures/malformed/pyproject.toml +6 -0
- corgea_cli-1.9.1/tests/fixtures/malformed/truncated-poetry.lock +3 -0
- corgea_cli-1.9.1/tests/fixtures/node-app/.corgea/deps.yml +8 -0
- corgea_cli-1.9.1/tests/fixtures/node-app/package-lock.json +44 -0
- corgea_cli-1.9.1/tests/fixtures/node-app/package.json +13 -0
- corgea_cli-1.9.1/tests/fixtures/node-monorepo/package-lock.json +11 -0
- corgea_cli-1.9.1/tests/fixtures/node-monorepo/package.json +6 -0
- corgea_cli-1.9.1/tests/fixtures/node-monorepo/packages/a/package.json +1 -0
- corgea_cli-1.9.1/tests/fixtures/node-monorepo/packages/b/package.json +1 -0
- corgea_cli-1.9.1/tests/fixtures/node-pnpm/package.json +7 -0
- corgea_cli-1.9.1/tests/fixtures/node-pnpm/pnpm-lock.yaml +5 -0
- corgea_cli-1.9.1/tests/fixtures/node-stale/package-lock.json +15 -0
- corgea_cli-1.9.1/tests/fixtures/node-stale/package.json +5 -0
- corgea_cli-1.9.1/tests/fixtures/node-transitive/package-lock.json +34 -0
- corgea_cli-1.9.1/tests/fixtures/node-transitive/package.json +7 -0
- corgea_cli-1.9.1/tests/fixtures/node-yarn/package.json +7 -0
- corgea_cli-1.9.1/tests/fixtures/node-yarn/yarn.lock +4 -0
- corgea_cli-1.9.1/tests/fixtures/python-pip-nolock/requirements.txt +4 -0
- corgea_cli-1.9.1/tests/fixtures/python-poetry/poetry.lock +31 -0
- corgea_cli-1.9.1/tests/fixtures/python-poetry/pyproject.toml +16 -0
- corgea_cli-1.9.1/tests/fixtures/python-poetry-multi/poetry.lock +34 -0
- corgea_cli-1.9.1/tests/fixtures/python-poetry-multi/pyproject.toml +8 -0
- corgea_cli-1.9.1/tests/fixtures/python-uv-requirements/pyproject.toml +3 -0
- corgea_cli-1.9.1/tests/fixtures/python-uv-requirements/requirements.txt +1 -0
- corgea_cli-1.9.1/tests/fixtures/python-uv-requirements/uv.lock +2 -0
- corgea_cli-1.9.1/tests/fixtures/vuln_api/README.md +32 -0
- corgea_cli-1.9.1/tests/fixtures/vuln_api/check_clean.json +1 -0
- corgea_cli-1.9.1/tests/fixtures/vuln_api/check_malware.json +15 -0
- corgea_cli-1.9.1/tests/fixtures/vuln_api/check_unknown.json +1 -0
- corgea_cli-1.9.1/tests/fixtures/vuln_api/check_vulnerable.json +15 -0
- corgea_cli-1.9.1/tests/harness_smoke.rs +88 -0
- corgea_cli-1.9.1/tests/logging_e2e.rs +103 -0
- corgea_cli-1.9.1/tests/vuln_api_contract.rs +178 -0
- corgea_cli-1.8.8/.github/workflows/test.yml +0 -26
- corgea_cli-1.8.8/README.md +0 -71
- corgea_cli-1.8.8/skills/corgea/SKILL.md +0 -168
- corgea_cli-1.8.8/src/config.rs +0 -107
- corgea_cli-1.8.8/src/log.rs +0 -8
- corgea_cli-1.8.8/src/main.rs +0 -377
- corgea_cli-1.8.8/src/scanners/parsers/sarif.rs +0 -70
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/LICENSE +0 -0
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/bin/corgea.js +0 -0
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/build_release.sh +0 -0
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/package.json +0 -0
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/pyproject.toml +0 -0
- {corgea_cli-1.8.8 → corgea_cli-1.9.1}/scripts/npm/bundle-binaries.js +0 -0
|
@@ -22,6 +22,7 @@ jobs:
|
|
|
22
22
|
linux-x86:
|
|
23
23
|
runs-on: ${{ matrix.platform.runner }}
|
|
24
24
|
strategy:
|
|
25
|
+
fail-fast: false
|
|
25
26
|
matrix:
|
|
26
27
|
platform:
|
|
27
28
|
- runner: ubuntu-latest
|
|
@@ -30,13 +31,27 @@ jobs:
|
|
|
30
31
|
target: x86
|
|
31
32
|
|
|
32
33
|
steps:
|
|
33
|
-
- uses: actions/checkout@
|
|
34
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
35
|
+
- name: Prepare resilient maturin download for manylinux Docker
|
|
36
|
+
run: |
|
|
37
|
+
bin_dir="${RUNNER_TEMP}/maturin-docker-bin"
|
|
38
|
+
mkdir -p "$bin_dir"
|
|
39
|
+
cat > "$bin_dir/curl" <<'EOF'
|
|
40
|
+
#!/bin/bash
|
|
41
|
+
set -euo pipefail
|
|
42
|
+
if [[ " $* " == *" PyO3/maturin/releases "* ]]; then
|
|
43
|
+
exec /usr/bin/curl --fail --retry 5 --retry-delay 3 --retry-all-errors "$@"
|
|
44
|
+
fi
|
|
45
|
+
exec /usr/bin/curl "$@"
|
|
46
|
+
EOF
|
|
47
|
+
chmod +x "$bin_dir/curl"
|
|
34
48
|
- name: Build wheels
|
|
35
49
|
uses: PyO3/maturin-action@v1
|
|
36
50
|
with:
|
|
37
51
|
target: ${{ matrix.platform.target }}
|
|
38
52
|
args: --release --out dist
|
|
39
53
|
manylinux: auto
|
|
54
|
+
docker-options: -v ${{ runner.temp }}/maturin-docker-bin/curl:/usr/local/bin/curl:ro
|
|
40
55
|
before-script-linux: |
|
|
41
56
|
# If we're running on rhel centos, install needed packages.
|
|
42
57
|
if command -v yum &> /dev/null; then
|
|
@@ -45,6 +60,26 @@ jobs:
|
|
|
45
60
|
# If we're running on debian-based system.
|
|
46
61
|
apt update -y && apt-get install -y libssl-dev openssl pkg-config musl-tools
|
|
47
62
|
fi
|
|
63
|
+
- name: Assert manylinux wheel compatibility tags
|
|
64
|
+
run: |
|
|
65
|
+
shopt -s nullglob
|
|
66
|
+
wheels=(dist/*.whl)
|
|
67
|
+
if ((${#wheels[@]} == 0)); then
|
|
68
|
+
echo "No wheels found in dist/"
|
|
69
|
+
exit 1
|
|
70
|
+
fi
|
|
71
|
+
for wheel in "${wheels[@]}"; do
|
|
72
|
+
base=$(basename "$wheel")
|
|
73
|
+
if [[ "$base" == *manylinux_2_3[0-9]* ]]; then
|
|
74
|
+
echo "Wheel tag too new for broad Linux support: $base"
|
|
75
|
+
exit 1
|
|
76
|
+
fi
|
|
77
|
+
if [[ ! "$base" =~ manylinux2014 ]]; then
|
|
78
|
+
echo "Expected manylinux2014 compatibility tag, got: $base"
|
|
79
|
+
exit 1
|
|
80
|
+
fi
|
|
81
|
+
echo "OK: $base"
|
|
82
|
+
done
|
|
48
83
|
- name: Upload wheels
|
|
49
84
|
uses: actions/upload-artifact@v4
|
|
50
85
|
with:
|
|
@@ -61,7 +96,7 @@ jobs:
|
|
|
61
96
|
- runner: windows-latest
|
|
62
97
|
target: x86
|
|
63
98
|
steps:
|
|
64
|
-
- uses: actions/checkout@
|
|
99
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
65
100
|
- name: Build wheels
|
|
66
101
|
uses: PyO3/maturin-action@v1
|
|
67
102
|
with:
|
|
@@ -83,7 +118,7 @@ jobs:
|
|
|
83
118
|
- runner: macos-14
|
|
84
119
|
target: aarch64
|
|
85
120
|
steps:
|
|
86
|
-
- uses: actions/checkout@
|
|
121
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
87
122
|
- name: Build wheels
|
|
88
123
|
uses: PyO3/maturin-action@v1
|
|
89
124
|
with:
|
|
@@ -98,7 +133,7 @@ jobs:
|
|
|
98
133
|
sdist:
|
|
99
134
|
runs-on: ubuntu-latest
|
|
100
135
|
steps:
|
|
101
|
-
- uses: actions/checkout@
|
|
136
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
102
137
|
- name: Build sdist
|
|
103
138
|
uses: PyO3/maturin-action@v1
|
|
104
139
|
with:
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Staging vuln-api contract
|
|
2
|
+
|
|
3
|
+
# The deterministic staging-target contract tests are #[ignore]d so the
|
|
4
|
+
# default `./harness ci` gate stays hermetic (no network). This scheduled,
|
|
5
|
+
# non-blocking job runs them against the live staging worker so endpoint /
|
|
6
|
+
# schema / seed drift is caught out-of-band instead of shipping undetected.
|
|
7
|
+
# It does not gate PRs — failures here signal "the staging contract moved",
|
|
8
|
+
# not "this PR is broken".
|
|
9
|
+
|
|
10
|
+
on:
|
|
11
|
+
schedule:
|
|
12
|
+
# Daily at 07:00 UTC.
|
|
13
|
+
- cron: "0 7 * * *"
|
|
14
|
+
workflow_dispatch: {}
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
staging-contract:
|
|
21
|
+
name: vuln-api staging contract (non-blocking)
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout
|
|
25
|
+
uses: actions/checkout@v6
|
|
26
|
+
|
|
27
|
+
- name: Setup Rust
|
|
28
|
+
uses: dtolnay/rust-toolchain@stable
|
|
29
|
+
|
|
30
|
+
- name: Cache cargo
|
|
31
|
+
uses: Swatinem/rust-cache@v2
|
|
32
|
+
|
|
33
|
+
- name: Run ignored staging contract tests
|
|
34
|
+
run: cargo test --test vuln_api_contract -- --ignored
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- master
|
|
8
|
+
pull_request:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
rust-tests:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout
|
|
16
|
+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
17
|
+
|
|
18
|
+
- name: Setup Rust
|
|
19
|
+
uses: dtolnay/rust-toolchain@stable
|
|
20
|
+
with:
|
|
21
|
+
components: llvm-tools-preview
|
|
22
|
+
|
|
23
|
+
- name: Install cargo-llvm-cov
|
|
24
|
+
uses: taiki-e/install-action@cargo-llvm-cov
|
|
25
|
+
|
|
26
|
+
- name: Install cargo-audit
|
|
27
|
+
uses: taiki-e/install-action@cargo-audit
|
|
28
|
+
|
|
29
|
+
- name: Cache cargo
|
|
30
|
+
uses: Swatinem/rust-cache@v2
|
|
31
|
+
|
|
32
|
+
- name: CI gate
|
|
33
|
+
run: ./harness ci
|
|
@@ -10,7 +10,7 @@ jobs:
|
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
11
|
steps:
|
|
12
12
|
- name: Checkout source repository
|
|
13
|
-
uses: actions/checkout@
|
|
13
|
+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
14
14
|
|
|
15
15
|
- name: Run AI Docs Sync
|
|
16
16
|
uses: Corgea/internal_actions/sync-docs-action@main
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
This subproject is the Corgea developer CLI (Rust → npm + pip via maturin).
|
|
4
|
+
|
|
5
|
+
## Commands
|
|
6
|
+
|
|
7
|
+
- After edits: `./harness check` — clippy fix, format, tests, suppression report
|
|
8
|
+
- Pre-commit: `./harness pre-commit` — staged Rust files only (auto via git hook)
|
|
9
|
+
- CI: `./harness ci` — strict clippy (`-D warnings`), format check, dep audit, tests + coverage gate (min 13%)
|
|
10
|
+
- Audit: `./harness audit` — `cargo audit` for known dep vulnerabilities
|
|
11
|
+
- Coverage: `./harness coverage [--min=N]` — cargo-llvm-cov; HTML report under `target/llvm-cov/`; fails if line coverage < N (default 13)
|
|
12
|
+
- Lint: `./harness lint` — clippy + format check, no fixes
|
|
13
|
+
- Test: `./harness test` — `cargo test`
|
|
14
|
+
- Fix: `./harness fix` — clippy fix + format
|
|
15
|
+
- Setup: `./harness setup-hooks` — install `.git/hooks/pre-commit`
|
|
16
|
+
- Auto-format: `./harness post-edit` — runs `cargo fmt` on changed Rust files (wire into your editor/agent's post-edit hook)
|
|
17
|
+
|
|
18
|
+
Add `--verbose` to stream raw command output instead of the quiet summary.
|
|
19
|
+
|
|
20
|
+
Coverage needs LLVM's `llvm-cov`/`llvm-profdata`. On a rustup toolchain, run
|
|
21
|
+
`rustup component add llvm-tools-preview`. On a non-rustup toolchain (e.g.
|
|
22
|
+
Homebrew Rust) those are missing, so point cargo-llvm-cov at a system LLVM:
|
|
23
|
+
`LLVM_COV="$(brew --prefix llvm)/bin/llvm-cov" LLVM_PROFDATA="$(brew --prefix llvm)/bin/llvm-profdata" ./harness coverage`.
|
|
24
|
+
CI uses its own toolchain and is unaffected.
|
|
@@ -105,6 +105,18 @@ dependencies = [
|
|
|
105
105
|
"derive_arbitrary",
|
|
106
106
|
]
|
|
107
107
|
|
|
108
|
+
[[package]]
|
|
109
|
+
name = "async-compression"
|
|
110
|
+
version = "0.4.42"
|
|
111
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
112
|
+
checksum = "e79b3f8a79cccc2898f31920fc69f304859b3bd567490f75ebf51ae1c792a9ac"
|
|
113
|
+
dependencies = [
|
|
114
|
+
"compression-codecs",
|
|
115
|
+
"compression-core",
|
|
116
|
+
"pin-project-lite",
|
|
117
|
+
"tokio",
|
|
118
|
+
]
|
|
119
|
+
|
|
108
120
|
[[package]]
|
|
109
121
|
name = "atomic-waker"
|
|
110
122
|
version = "1.1.2"
|
|
@@ -287,6 +299,23 @@ version = "1.0.4"
|
|
|
287
299
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
288
300
|
checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
|
|
289
301
|
|
|
302
|
+
[[package]]
|
|
303
|
+
name = "compression-codecs"
|
|
304
|
+
version = "0.4.38"
|
|
305
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
306
|
+
checksum = "ce2548391e9c1929c21bf6aa2680af86fe4c1b33e6cea9ac1cfeec0bd11218cf"
|
|
307
|
+
dependencies = [
|
|
308
|
+
"compression-core",
|
|
309
|
+
"flate2",
|
|
310
|
+
"memchr",
|
|
311
|
+
]
|
|
312
|
+
|
|
313
|
+
[[package]]
|
|
314
|
+
name = "compression-core"
|
|
315
|
+
version = "0.4.32"
|
|
316
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
317
|
+
checksum = "cc14f565cf027a105f7a44ccf9e5b424348421a1d8952a8fc9d499d313107789"
|
|
318
|
+
|
|
290
319
|
[[package]]
|
|
291
320
|
name = "constant_time_eq"
|
|
292
321
|
version = "0.3.1"
|
|
@@ -340,11 +369,13 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
|
|
340
369
|
|
|
341
370
|
[[package]]
|
|
342
371
|
name = "corgea"
|
|
343
|
-
version = "1.
|
|
372
|
+
version = "1.9.1"
|
|
344
373
|
dependencies = [
|
|
345
374
|
"chrono",
|
|
346
375
|
"clap",
|
|
376
|
+
"corgea",
|
|
347
377
|
"dirs",
|
|
378
|
+
"env_logger",
|
|
348
379
|
"git2",
|
|
349
380
|
"globset",
|
|
350
381
|
"http",
|
|
@@ -352,14 +383,17 @@ dependencies = [
|
|
|
352
383
|
"hyper",
|
|
353
384
|
"hyper-util",
|
|
354
385
|
"ignore",
|
|
386
|
+
"log",
|
|
355
387
|
"open",
|
|
356
388
|
"openssl",
|
|
357
389
|
"quick-xml",
|
|
358
390
|
"regex",
|
|
359
391
|
"reqwest",
|
|
392
|
+
"semver",
|
|
360
393
|
"serde",
|
|
361
394
|
"serde_derive",
|
|
362
395
|
"serde_json",
|
|
396
|
+
"serde_yaml_ng",
|
|
363
397
|
"tempfile",
|
|
364
398
|
"termcolor",
|
|
365
399
|
"tokio",
|
|
@@ -523,6 +557,29 @@ version = "1.15.0"
|
|
|
523
557
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
524
558
|
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
|
|
525
559
|
|
|
560
|
+
[[package]]
|
|
561
|
+
name = "env_filter"
|
|
562
|
+
version = "1.0.0"
|
|
563
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
564
|
+
checksum = "7a1c3cc8e57274ec99de65301228b537f1e4eedc1b8e0f9411c6caac8ae7308f"
|
|
565
|
+
dependencies = [
|
|
566
|
+
"log",
|
|
567
|
+
"regex",
|
|
568
|
+
]
|
|
569
|
+
|
|
570
|
+
[[package]]
|
|
571
|
+
name = "env_logger"
|
|
572
|
+
version = "0.11.9"
|
|
573
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
574
|
+
checksum = "b2daee4ea451f429a58296525ddf28b45a3b64f1acf6587e2067437bb11e218d"
|
|
575
|
+
dependencies = [
|
|
576
|
+
"anstream",
|
|
577
|
+
"anstyle",
|
|
578
|
+
"env_filter",
|
|
579
|
+
"jiff",
|
|
580
|
+
"log",
|
|
581
|
+
]
|
|
582
|
+
|
|
526
583
|
[[package]]
|
|
527
584
|
name = "equivalent"
|
|
528
585
|
version = "1.0.2"
|
|
@@ -1092,6 +1149,30 @@ version = "1.0.15"
|
|
|
1092
1149
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1093
1150
|
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
|
|
1094
1151
|
|
|
1152
|
+
[[package]]
|
|
1153
|
+
name = "jiff"
|
|
1154
|
+
version = "0.2.28"
|
|
1155
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1156
|
+
checksum = "4603d3033e49e2b0e31229fcab20a5d40089c607d975cd9c80551dc69eed9102"
|
|
1157
|
+
dependencies = [
|
|
1158
|
+
"jiff-static",
|
|
1159
|
+
"log",
|
|
1160
|
+
"portable-atomic",
|
|
1161
|
+
"portable-atomic-util",
|
|
1162
|
+
"serde_core",
|
|
1163
|
+
]
|
|
1164
|
+
|
|
1165
|
+
[[package]]
|
|
1166
|
+
name = "jiff-static"
|
|
1167
|
+
version = "0.2.28"
|
|
1168
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1169
|
+
checksum = "782d32378dddf207193ac91cefb848ad41abb58195c95168e1291227a0832b47"
|
|
1170
|
+
dependencies = [
|
|
1171
|
+
"proc-macro2",
|
|
1172
|
+
"quote",
|
|
1173
|
+
"syn",
|
|
1174
|
+
]
|
|
1175
|
+
|
|
1095
1176
|
[[package]]
|
|
1096
1177
|
name = "jobserver"
|
|
1097
1178
|
version = "0.1.34"
|
|
@@ -1441,6 +1522,21 @@ version = "0.3.32"
|
|
|
1441
1522
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1442
1523
|
checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
|
|
1443
1524
|
|
|
1525
|
+
[[package]]
|
|
1526
|
+
name = "portable-atomic"
|
|
1527
|
+
version = "1.13.1"
|
|
1528
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1529
|
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
|
1530
|
+
|
|
1531
|
+
[[package]]
|
|
1532
|
+
name = "portable-atomic-util"
|
|
1533
|
+
version = "0.2.7"
|
|
1534
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1535
|
+
checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618"
|
|
1536
|
+
dependencies = [
|
|
1537
|
+
"portable-atomic",
|
|
1538
|
+
]
|
|
1539
|
+
|
|
1444
1540
|
[[package]]
|
|
1445
1541
|
name = "potential_utf"
|
|
1446
1542
|
version = "0.1.3"
|
|
@@ -1560,6 +1656,7 @@ version = "0.12.24"
|
|
|
1560
1656
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1561
1657
|
checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f"
|
|
1562
1658
|
dependencies = [
|
|
1659
|
+
"async-compression",
|
|
1563
1660
|
"base64",
|
|
1564
1661
|
"bytes",
|
|
1565
1662
|
"cookie",
|
|
@@ -1586,6 +1683,7 @@ dependencies = [
|
|
|
1586
1683
|
"sync_wrapper",
|
|
1587
1684
|
"tokio",
|
|
1588
1685
|
"tokio-native-tls",
|
|
1686
|
+
"tokio-util",
|
|
1589
1687
|
"tower",
|
|
1590
1688
|
"tower-http",
|
|
1591
1689
|
"tower-service",
|
|
@@ -1695,6 +1793,12 @@ dependencies = [
|
|
|
1695
1793
|
"libc",
|
|
1696
1794
|
]
|
|
1697
1795
|
|
|
1796
|
+
[[package]]
|
|
1797
|
+
name = "semver"
|
|
1798
|
+
version = "1.0.28"
|
|
1799
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1800
|
+
checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
|
|
1801
|
+
|
|
1698
1802
|
[[package]]
|
|
1699
1803
|
name = "serde"
|
|
1700
1804
|
version = "1.0.228"
|
|
@@ -1759,6 +1863,19 @@ dependencies = [
|
|
|
1759
1863
|
"serde",
|
|
1760
1864
|
]
|
|
1761
1865
|
|
|
1866
|
+
[[package]]
|
|
1867
|
+
name = "serde_yaml_ng"
|
|
1868
|
+
version = "0.10.0"
|
|
1869
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1870
|
+
checksum = "7b4db627b98b36d4203a7b458cf3573730f2bb591b28871d916dfa9efabfd41f"
|
|
1871
|
+
dependencies = [
|
|
1872
|
+
"indexmap",
|
|
1873
|
+
"itoa",
|
|
1874
|
+
"ryu",
|
|
1875
|
+
"serde",
|
|
1876
|
+
"unsafe-libyaml",
|
|
1877
|
+
]
|
|
1878
|
+
|
|
1762
1879
|
[[package]]
|
|
1763
1880
|
name = "sha1"
|
|
1764
1881
|
version = "0.10.6"
|
|
@@ -2169,6 +2286,12 @@ version = "1.0.19"
|
|
|
2169
2286
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2170
2287
|
checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d"
|
|
2171
2288
|
|
|
2289
|
+
[[package]]
|
|
2290
|
+
name = "unsafe-libyaml"
|
|
2291
|
+
version = "0.2.11"
|
|
2292
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2293
|
+
checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
|
|
2294
|
+
|
|
2172
2295
|
[[package]]
|
|
2173
2296
|
name = "url"
|
|
2174
2297
|
version = "2.5.7"
|
|
@@ -1,23 +1,40 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "corgea"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.9.1"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
|
|
7
7
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
8
8
|
|
|
9
|
+
[[bin]]
|
|
10
|
+
name = "corgea"
|
|
11
|
+
path = "src/main.rs"
|
|
12
|
+
|
|
13
|
+
[features]
|
|
14
|
+
# Compiles the in-crate vuln-api test stub (`vuln_api_stub`). Enabled for all
|
|
15
|
+
# test builds via the self dev-dependency below; never part of release builds.
|
|
16
|
+
test-stub = []
|
|
17
|
+
|
|
18
|
+
[dev-dependencies]
|
|
19
|
+
corgea = { path = ".", features = ["test-stub"] }
|
|
20
|
+
tempfile = "3.12.0"
|
|
21
|
+
|
|
9
22
|
[dependencies]
|
|
10
23
|
clap = { version = "4.4.13", features = ["derive"] }
|
|
11
24
|
dirs = "5.0.1"
|
|
12
25
|
reqwest = { version = "0.12.23", default-features = false, features = [
|
|
13
26
|
"blocking",
|
|
14
27
|
"cookies",
|
|
28
|
+
"gzip",
|
|
15
29
|
"json",
|
|
16
30
|
"multipart",
|
|
17
31
|
"native-tls",
|
|
18
32
|
"system-proxy",
|
|
19
33
|
] }
|
|
20
34
|
toml = "0.8.8"
|
|
35
|
+
log = "0.4"
|
|
36
|
+
env_logger = "0.11"
|
|
37
|
+
semver = "1"
|
|
21
38
|
serde = { version = "1.0.195", features = ["derive"] }
|
|
22
39
|
serde_json = "1.0.111"
|
|
23
40
|
serde_derive = "1.0.195"
|
|
@@ -40,6 +57,7 @@ http-body-util = "0.1"
|
|
|
40
57
|
url = "2.5"
|
|
41
58
|
open = "5.0"
|
|
42
59
|
urlencoding = "2.1"
|
|
60
|
+
serde_yaml_ng = "0.10"
|
|
43
61
|
|
|
44
62
|
[target.'cfg(not(target_os = "windows"))'.dependencies]
|
|
45
63
|
openssl = { version = "0.10", features = ["vendored"] }
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Corgea CLI
|
|
2
|
+
Corgea CLI is a powerful developer tool that helps you find and fix security vulnerabilities in your code. Using our AI-powered scanner (blast) and our platform, Corgea identifies complex security issues like business logic flaws, authentication vulnerabilities, and other hard-to-find bugs. The CLI provides commands to scan your codebase, inspect findings, interact with fixes, and much more - all designed with a great developer experience in mind.
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
For full documentation, visit https://docs.corgea.app/cli
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
### Using npm
|
|
10
|
+
```
|
|
11
|
+
npm install -g @corgea/cli
|
|
12
|
+
```
|
|
13
|
+
The npm package bundles native binaries for all supported platforms. The correct binary for your OS and architecture is selected automatically at runtime.
|
|
14
|
+
|
|
15
|
+
### Using pip
|
|
16
|
+
```
|
|
17
|
+
pip install corgea-cli
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Manual Installation
|
|
21
|
+
You can get the latest binaries for your OS from https://github.com/Corgea/cli/releases.
|
|
22
|
+
|
|
23
|
+
### Setup
|
|
24
|
+
Once the binary is installed, login with your token from the Corgea app.
|
|
25
|
+
```
|
|
26
|
+
corgea login <token>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Dependency Inventory (offline)
|
|
30
|
+
|
|
31
|
+
`corgea deps` builds a dependency inventory from npm, Python, and Java manifests
|
|
32
|
+
and lockfiles, then evaluates a pinning policy (DEP rules). Runs fully offline —
|
|
33
|
+
no token or network required.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
corgea deps scan # table report for the current directory
|
|
37
|
+
corgea deps scan --format agent # compact TSV for coding agents
|
|
38
|
+
corgea deps scan --format json # JSON inventory on stdout
|
|
39
|
+
corgea deps scan --format quiet # no stdout; exit code still applies
|
|
40
|
+
corgea deps scan --fail-on high # exit 1 if any finding is >= high
|
|
41
|
+
corgea deps scan --out-format json # machine-readable (json or sarif)
|
|
42
|
+
corgea deps graph --format json # print the resolved dependency graph
|
|
43
|
+
corgea deps explain <package> --format agent # show why a package is present
|
|
44
|
+
corgea deps diff --base origin/main --format json
|
|
45
|
+
corgea deps sbom --format cyclonedx # emit a CycloneDX SBOM
|
|
46
|
+
corgea deps policy init --exist-ok # write starter policy, or keep existing file
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`corgea deps` defaults to `--format agent` when an agent environment is detected (`AI_AGENT`, `CODEX_SANDBOX`, `CLAUDECODE`, and related agent variables). Use `--format human` to force the normal terminal output.
|
|
50
|
+
|
|
51
|
+
See [Dependency Scanning (CLI)](https://docs.corgea.app/cli/deps) for the full flag and exit-code reference.
|
|
52
|
+
|
|
53
|
+
## Install Gate
|
|
54
|
+
|
|
55
|
+
Prefix a package-manager install with `corgea` to vet every package it would
|
|
56
|
+
install — named **and transitive** — against Corgea's vulnerability API *before*
|
|
57
|
+
anything lands on disk. Known-vulnerable or malicious versions block the install;
|
|
58
|
+
a clean set runs the underlying command untouched. Works with `pip`, `npm`,
|
|
59
|
+
`yarn`, `pnpm`, and `uv`.
|
|
60
|
+
|
|
61
|
+
No token required — baseline public CVE checks run out of the box. Try it:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
corgea npm install lodash@4.17.20 # blocks: known-vulnerable (CVE-2025-13465), exits 1
|
|
65
|
+
corgea pip install requests # resolves, checks the verdict, then runs pip
|
|
66
|
+
corgea npm install axios@^1.0.0 # ranges resolve to a concrete version first
|
|
67
|
+
corgea pip --force install <pkg> # print findings but install anyway
|
|
68
|
+
corgea pip list # non-install subcommands pass straight through
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`corgea pip install` and `corgea npm install` resolve the **full would-install
|
|
72
|
+
set** (named + transitive) via a safe dry-run, so a vulnerable *transitive*
|
|
73
|
+
dependency blocks too. Blocked findings steer to the fix: each advisory shows
|
|
74
|
+
`fixed in <version>`, and the gate prints the safe version to install instead.
|
|
75
|
+
|
|
76
|
+
The gate also blocks **freshly published** packages — anything published within
|
|
77
|
+
the recency window (default 14 days) — to catch just-shipped typosquats and
|
|
78
|
+
hijacks before advisory feeds catch up. It is on by default; turn it off with
|
|
79
|
+
`recency_gate = false` in `~/.corgea/config.toml`, retune the window with
|
|
80
|
+
`recency_threshold_days`, or pass `--force` for a one-off install.
|
|
81
|
+
|
|
82
|
+
Logging in (`corgea login`) upgrades the gate to authenticated enforcement —
|
|
83
|
+
unverifiable packages, resolution errors, and lookup failures then fail closed
|
|
84
|
+
(public mode warns and continues). Wrapper flags (`--force`, `--json`) go between
|
|
85
|
+
the manager and its command: `corgea npm --force install <pkg>`.
|
|
86
|
+
|
|
87
|
+
See [the CLI docs](https://docs.corgea.app/cli) for the full flag and exit-code reference.
|
|
88
|
+
|
|
89
|
+
## Development Setup
|
|
90
|
+
|
|
91
|
+
### Prerequisites
|
|
92
|
+
- Python 3.8 or higher
|
|
93
|
+
- Rust toolchain (for maturin)
|
|
94
|
+
|
|
95
|
+
### Using venv (Python Virtual Environment)
|
|
96
|
+
1. Create and activate a virtual environment:
|
|
97
|
+
```
|
|
98
|
+
python -m venv .venv
|
|
99
|
+
source .venv/bin/activate # On Unix/macOS
|
|
100
|
+
.venv\Scripts\activate # On Windows
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
2. Install dependencies:
|
|
104
|
+
```
|
|
105
|
+
pip install maturin
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
3. Build and install the package in development mode:
|
|
109
|
+
```
|
|
110
|
+
maturin develop
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Using Conda
|
|
114
|
+
1. Create and activate a conda environment:
|
|
115
|
+
```
|
|
116
|
+
conda create -n corgea-cli python=3.8
|
|
117
|
+
conda activate corgea-cli
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
2. Install dependencies:
|
|
121
|
+
```
|
|
122
|
+
pip install maturin
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
3. Build and install the package in development mode:
|
|
126
|
+
```
|
|
127
|
+
maturin develop
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Note: After making changes to Rust code, you'll need to run `maturin develop` again to rebuild the package.
|