corgea-cli 1.9.0__tar.gz → 1.9.2__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.0 → corgea_cli-1.9.2}/.github/workflows/npm-publish.yml +1 -1
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/.github/workflows/release-binaries.yml +1 -1
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/.github/workflows/release.yml +4 -4
- corgea_cli-1.9.2/.github/workflows/staging-contract.yml +34 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/.github/workflows/test.yml +1 -1
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/.github/workflows/update_docs..yml +1 -1
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/Cargo.lock +44 -5
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/Cargo.toml +21 -2
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/PKG-INFO +1 -1
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/README.md +36 -0
- corgea_cli-1.9.2/RELEASING.md +127 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/harness +3 -3
- corgea_cli-1.9.2/skills/corgea/SKILL.md +358 -0
- corgea_cli-1.9.2/src/advisories.rs +518 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/authorize.rs +22 -1
- corgea_cli-1.9.2/src/config.rs +217 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/ecosystems/npm.rs +5 -1
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/ecosystems/pypi.rs +4 -1
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/inspect.rs +5 -3
- corgea_cli-1.9.2/src/lib.rs +14 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/list.rs +32 -3
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/main.rs +218 -5
- corgea_cli-1.9.2/src/precheck/detect.rs +493 -0
- corgea_cli-1.9.2/src/precheck/exec.rs +83 -0
- corgea_cli-1.9.2/src/precheck/mod.rs +1393 -0
- corgea_cli-1.9.2/src/precheck/parse.rs +1616 -0
- corgea_cli-1.9.2/src/precheck/render.rs +706 -0
- corgea_cli-1.9.2/src/precheck/test_support.rs +109 -0
- corgea_cli-1.9.2/src/precheck/tree.rs +948 -0
- corgea_cli-1.9.2/src/precheck/uv.rs +333 -0
- corgea_cli-1.9.2/src/precheck/verdict.rs +1007 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/scanners/blast.rs +321 -23
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/scanners/fortify.rs +56 -2
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/targets.rs +200 -1
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/utils/api.rs +39 -37
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/utils/generic.rs +100 -6
- corgea_cli-1.9.2/src/verify_deps/mod.rs +47 -0
- corgea_cli-1.9.2/src/verify_deps/registry.rs +996 -0
- corgea_cli-1.9.2/src/vuln_api/mod.rs +1298 -0
- corgea_cli-1.9.2/src/vuln_api_stub/mod.rs +480 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/wait.rs +2 -8
- corgea_cli-1.9.2/tests/cli_advisories.rs +417 -0
- corgea_cli-1.9.2/tests/cli_bare_install.rs +529 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/cli_deps.rs +34 -0
- corgea_cli-1.9.2/tests/cli_exec_fallback.rs +111 -0
- corgea_cli-1.9.2/tests/cli_install.rs +930 -0
- corgea_cli-1.9.2/tests/cli_npm_ci.rs +421 -0
- corgea_cli-1.9.2/tests/cli_provenance.rs +248 -0
- corgea_cli-1.9.2/tests/cli_remediation.rs +119 -0
- corgea_cli-1.9.2/tests/cli_tree.rs +497 -0
- corgea_cli-1.9.2/tests/cli_uv_sync.rs +361 -0
- corgea_cli-1.9.2/tests/cli_verdict.rs +587 -0
- corgea_cli-1.9.2/tests/common/mod.rs +435 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/python-poetry/pyproject.toml +5 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/python-poetry-multi/pyproject.toml +1 -1
- corgea_cli-1.9.2/tests/fixtures/vuln_api/README.md +38 -0
- corgea_cli-1.9.2/tests/fixtures/vuln_api/check_clean.json +1 -0
- corgea_cli-1.9.2/tests/fixtures/vuln_api/check_malware.json +16 -0
- corgea_cli-1.9.2/tests/fixtures/vuln_api/check_unknown.json +1 -0
- corgea_cli-1.9.2/tests/fixtures/vuln_api/check_vulnerable.json +16 -0
- corgea_cli-1.9.2/tests/fixtures/vuln_api/package_profile.json +47 -0
- corgea_cli-1.9.2/tests/fixtures/vuln_api/package_profile_not_found.json +1 -0
- corgea_cli-1.9.2/tests/harness_smoke.rs +88 -0
- corgea_cli-1.9.2/tests/vuln_api_contract.rs +264 -0
- corgea_cli-1.9.0/skills/corgea/SKILL.md +0 -190
- corgea_cli-1.9.0/src/config.rs +0 -121
- corgea_cli-1.9.0/src/lib.rs +0 -1
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/.codex/hooks.json +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/.gitignore +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/AGENTS.md +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/LICENSE +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/bin/corgea.js +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/build_release.sh +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/examples/deps_skill.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/package.json +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/pyproject.toml +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/scripts/npm/bundle-binaries.js +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/cicd.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/detect.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/diff.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/ecosystems/evaluate.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/ecosystems/maven.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/ecosystems/mod.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/explain.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/findings.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/mod.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/model.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/parse/mod.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/parse/npm_lock.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/parse/python_lock.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/policy.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/report.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/run.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/skill.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/tests/common.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/tests/correctness_tests.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/tests/detect_tests.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/tests/diff_tests.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/tests/explain_tests.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/tests/findings_tests.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/tests/maven_tests.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/tests/mod.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/tests/npm_tests.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/tests/policy_tests.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/tests/pypi_tests.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/tests/report_tests.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/tests/robustness_tests.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/deps/tests/slice0_tests.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/log.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/scan.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/scanners/parsers/checkmarx.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/scanners/parsers/coverity.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/scanners/parsers/mod.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/scanners/parsers/sarif.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/scanners/parsers/semgrep.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/setup_hooks.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/skill.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/src/utils/terminal.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/cli_deps_skill.rs +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/README.md +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/go-mod-smoke/go.mod +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/go-mod-smoke/go.sum +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/java-gradle/build.gradle +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/java-gradle/gradle.lockfile +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/java-maven/pom.xml +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/malformed/not-xml-pom.xml +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/malformed/package-lock.json +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/malformed/package.json +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/malformed/poetry.lock +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/malformed/pyproject.toml +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/malformed/truncated-poetry.lock +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/node-app/.corgea/deps.yml +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/node-app/package-lock.json +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/node-app/package.json +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/node-monorepo/package-lock.json +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/node-monorepo/package.json +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/node-monorepo/packages/a/package.json +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/node-monorepo/packages/b/package.json +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/node-pnpm/package.json +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/node-pnpm/pnpm-lock.yaml +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/node-stale/package-lock.json +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/node-stale/package.json +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/node-transitive/package-lock.json +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/node-transitive/package.json +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/node-yarn/package.json +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/node-yarn/yarn.lock +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/python-pip-nolock/requirements.txt +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/python-poetry/poetry.lock +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/python-poetry-multi/poetry.lock +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/python-uv-requirements/pyproject.toml +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/python-uv-requirements/requirements.txt +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/fixtures/python-uv-requirements/uv.lock +0 -0
- {corgea_cli-1.9.0 → corgea_cli-1.9.2}/tests/logging_e2e.rs +0 -0
|
@@ -31,7 +31,7 @@ jobs:
|
|
|
31
31
|
target: x86
|
|
32
32
|
|
|
33
33
|
steps:
|
|
34
|
-
- uses: actions/checkout@
|
|
34
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
35
35
|
- name: Prepare resilient maturin download for manylinux Docker
|
|
36
36
|
run: |
|
|
37
37
|
bin_dir="${RUNNER_TEMP}/maturin-docker-bin"
|
|
@@ -96,7 +96,7 @@ jobs:
|
|
|
96
96
|
- runner: windows-latest
|
|
97
97
|
target: x86
|
|
98
98
|
steps:
|
|
99
|
-
- uses: actions/checkout@
|
|
99
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
100
100
|
- name: Build wheels
|
|
101
101
|
uses: PyO3/maturin-action@v1
|
|
102
102
|
with:
|
|
@@ -118,7 +118,7 @@ jobs:
|
|
|
118
118
|
- runner: macos-14
|
|
119
119
|
target: aarch64
|
|
120
120
|
steps:
|
|
121
|
-
- uses: actions/checkout@
|
|
121
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
122
122
|
- name: Build wheels
|
|
123
123
|
uses: PyO3/maturin-action@v1
|
|
124
124
|
with:
|
|
@@ -133,7 +133,7 @@ jobs:
|
|
|
133
133
|
sdist:
|
|
134
134
|
runs-on: ubuntu-latest
|
|
135
135
|
steps:
|
|
136
|
-
- uses: actions/checkout@
|
|
136
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
137
137
|
- name: Build sdist
|
|
138
138
|
uses: PyO3/maturin-action@v1
|
|
139
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
|
|
@@ -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
|
|
@@ -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,10 +369,11 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
|
|
340
369
|
|
|
341
370
|
[[package]]
|
|
342
371
|
name = "corgea"
|
|
343
|
-
version = "1.9.
|
|
372
|
+
version = "1.9.2"
|
|
344
373
|
dependencies = [
|
|
345
374
|
"chrono",
|
|
346
375
|
"clap",
|
|
376
|
+
"corgea",
|
|
347
377
|
"dirs",
|
|
348
378
|
"env_logger",
|
|
349
379
|
"git2",
|
|
@@ -359,6 +389,7 @@ dependencies = [
|
|
|
359
389
|
"quick-xml",
|
|
360
390
|
"regex",
|
|
361
391
|
"reqwest",
|
|
392
|
+
"semver",
|
|
362
393
|
"serde",
|
|
363
394
|
"serde_derive",
|
|
364
395
|
"serde_json",
|
|
@@ -419,9 +450,9 @@ dependencies = [
|
|
|
419
450
|
|
|
420
451
|
[[package]]
|
|
421
452
|
name = "crossbeam-epoch"
|
|
422
|
-
version = "0.9.
|
|
453
|
+
version = "0.9.20"
|
|
423
454
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
424
|
-
checksum = "
|
|
455
|
+
checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f"
|
|
425
456
|
dependencies = [
|
|
426
457
|
"crossbeam-utils",
|
|
427
458
|
]
|
|
@@ -1548,9 +1579,9 @@ dependencies = [
|
|
|
1548
1579
|
|
|
1549
1580
|
[[package]]
|
|
1550
1581
|
name = "quick-xml"
|
|
1551
|
-
version = "0.
|
|
1582
|
+
version = "0.41.0"
|
|
1552
1583
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1553
|
-
checksum = "
|
|
1584
|
+
checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1"
|
|
1554
1585
|
dependencies = [
|
|
1555
1586
|
"memchr",
|
|
1556
1587
|
]
|
|
@@ -1625,6 +1656,7 @@ version = "0.12.24"
|
|
|
1625
1656
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1626
1657
|
checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f"
|
|
1627
1658
|
dependencies = [
|
|
1659
|
+
"async-compression",
|
|
1628
1660
|
"base64",
|
|
1629
1661
|
"bytes",
|
|
1630
1662
|
"cookie",
|
|
@@ -1651,6 +1683,7 @@ dependencies = [
|
|
|
1651
1683
|
"sync_wrapper",
|
|
1652
1684
|
"tokio",
|
|
1653
1685
|
"tokio-native-tls",
|
|
1686
|
+
"tokio-util",
|
|
1654
1687
|
"tower",
|
|
1655
1688
|
"tower-http",
|
|
1656
1689
|
"tower-service",
|
|
@@ -1760,6 +1793,12 @@ dependencies = [
|
|
|
1760
1793
|
"libc",
|
|
1761
1794
|
]
|
|
1762
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
|
+
|
|
1763
1802
|
[[package]]
|
|
1764
1803
|
name = "serde"
|
|
1765
1804
|
version = "1.0.228"
|
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "corgea"
|
|
3
|
-
version = "1.9.
|
|
3
|
+
version = "1.9.2"
|
|
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",
|
|
@@ -20,6 +34,7 @@ reqwest = { version = "0.12.23", default-features = false, features = [
|
|
|
20
34
|
toml = "0.8.8"
|
|
21
35
|
log = "0.4"
|
|
22
36
|
env_logger = "0.11"
|
|
37
|
+
semver = "1"
|
|
23
38
|
serde = { version = "1.0.195", features = ["derive"] }
|
|
24
39
|
serde_json = "1.0.111"
|
|
25
40
|
serde_derive = "1.0.195"
|
|
@@ -27,7 +42,7 @@ uuid = { version = "1.7.0", features = ["v4"] }
|
|
|
27
42
|
which = "6.0.0"
|
|
28
43
|
zip = "2.3.0"
|
|
29
44
|
tempfile = "3.12.0"
|
|
30
|
-
quick-xml = "0.
|
|
45
|
+
quick-xml = "0.41"
|
|
31
46
|
ignore = "0.4"
|
|
32
47
|
globset = "0.4"
|
|
33
48
|
termcolor = "1.1"
|
|
@@ -46,3 +61,7 @@ serde_yaml_ng = "0.10"
|
|
|
46
61
|
|
|
47
62
|
[target.'cfg(not(target_os = "windows"))'.dependencies]
|
|
48
63
|
openssl = { version = "0.10", features = ["vendored"] }
|
|
64
|
+
|
|
65
|
+
[profile.release]
|
|
66
|
+
strip = true
|
|
67
|
+
lto = "thin"
|
|
@@ -50,6 +50,42 @@ corgea deps policy init --exist-ok # write starter policy, or keep existing
|
|
|
50
50
|
|
|
51
51
|
See [Dependency Scanning (CLI)](https://docs.corgea.app/cli/deps) for the full flag and exit-code reference.
|
|
52
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
|
+
|
|
53
89
|
## Development Setup
|
|
54
90
|
|
|
55
91
|
### Prerequisites
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Releasing the Corgea CLI
|
|
2
|
+
|
|
3
|
+
The `corgea` CLI ships to three channels, all driven by **one git tag**:
|
|
4
|
+
|
|
5
|
+
| Channel | Package | Install |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| npm | `@corgea/cli` (scoped, bundles native binaries) | `npm install -g @corgea/cli` |
|
|
8
|
+
| PyPI | `corgea-cli` (maturin-built wheels) | `pip install corgea-cli` |
|
|
9
|
+
| GitHub Release | `corgea-<target>.zip` (raw binaries) | download from the [Releases page](https://github.com/Corgea/cli/releases) |
|
|
10
|
+
|
|
11
|
+
Pushing an annotated `vX.Y.Z` tag to `main` fans out to three GitHub Actions workflows that build and publish all three. **Publishing is automated; the changelog is not** (see [Release notes](#release-notes)).
|
|
12
|
+
|
|
13
|
+
## Versioning
|
|
14
|
+
|
|
15
|
+
- **`Cargo.toml` `version` is the single source of truth.** Follow [SemVer](https://semver.org/).
|
|
16
|
+
- **PyPI** reads it automatically: `pyproject.toml` sets `dynamic = ["version"]`, so maturin takes the version from `Cargo.toml`.
|
|
17
|
+
- **npm** does *not* read `Cargo.toml`. `package.json` pins a placeholder (`0.0.0`); the real version is set from the **tag name** at publish time (`npm version <X.Y.Z> --no-git-tag-version` in `npm-publish.yml`).
|
|
18
|
+
- **The tag, `Cargo.toml`, and the published version must agree.** Bump `Cargo.toml` to `X.Y.Z` *before* tagging `vX.Y.Z`, or PyPI ships a different version than npm/GitHub.
|
|
19
|
+
- **Tags must be `v`-prefixed** (`v1.9.1`, not `1.9.1`). npm auto-publish keys off the tag starting with `v`; a non-`v` tag skips the npm publish entirely (this happened once with `1.8.8`).
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
- Write access to `Corgea/cli` and the [`gh`](https://cli.github.com/) CLI authenticated.
|
|
24
|
+
- These repository secrets are already configured in CI (no per-release action needed): `PYPI_API_TOKEN`, `NPM_TOKEN`, `GITHUB_TOKEN`.
|
|
25
|
+
- A clean checkout of `main` with all release-bound PRs already merged.
|
|
26
|
+
|
|
27
|
+
## Release procedure
|
|
28
|
+
|
|
29
|
+
1. **Land all changes on `main`** through reviewed PRs. Nothing ships that isn't on `main`.
|
|
30
|
+
|
|
31
|
+
2. **Bump the version.** Edit `Cargo.toml` `version = "X.Y.Z"` and merge it to `main`. This is the only manual version edit; PyPI and npm derive theirs from it and the tag.
|
|
32
|
+
|
|
33
|
+
3. **Gate on the merge commit.** From a clean `main`:
|
|
34
|
+
```bash
|
|
35
|
+
git checkout main
|
|
36
|
+
git pull --ff-only
|
|
37
|
+
./harness ci # strict clippy (-D warnings), format check, dep audit, tests, coverage ≥ 13%
|
|
38
|
+
```
|
|
39
|
+
Do not tag if `./harness ci` is red.
|
|
40
|
+
|
|
41
|
+
4. **Tag and push.** Two equivalent options:
|
|
42
|
+
|
|
43
|
+
**a. Tag, then add notes (matches existing history):**
|
|
44
|
+
```bash
|
|
45
|
+
git tag -a vX.Y.Z -m "vX.Y.Z"
|
|
46
|
+
git push origin vX.Y.Z
|
|
47
|
+
# after the release exists, fill notes (see below)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**b. Create the GitHub Release + tag + notes in one step (recommended):**
|
|
51
|
+
```bash
|
|
52
|
+
gh release create vX.Y.Z --target main --generate-notes
|
|
53
|
+
```
|
|
54
|
+
`--generate-notes` produces the same "What's Changed / Full Changelog" body used by past releases. The tag push then triggers the publish workflows.
|
|
55
|
+
|
|
56
|
+
5. **Watch the workflows, in this order** (Actions tab):
|
|
57
|
+
|
|
58
|
+
| # | Workflow | File | Publishes |
|
|
59
|
+
|---|---|---|---|
|
|
60
|
+
| 1 | **CI** | `release.yml` | wheels → **PyPI** (`corgea-cli`), on tag |
|
|
61
|
+
| 2 | **Native Binary Release** | `release-binaries.yml` | 6 target zips → **GitHub Release** |
|
|
62
|
+
| 3 | **Publish npm Package** | `npm-publish.yml` | bundles binaries → **npm** (`@corgea/cli`) |
|
|
63
|
+
|
|
64
|
+
Workflow 3 is triggered by workflow 2 completing successfully (and only when the tag is `v`-prefixed). If it does not auto-start, dispatch it manually:
|
|
65
|
+
```bash
|
|
66
|
+
gh workflow run npm-publish.yml -f tag=vX.Y.Z
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## What gets built
|
|
70
|
+
|
|
71
|
+
- **PyPI wheels** (`release.yml`): Linux (x86_64, x86), Windows (x64, x86), macOS (x86_64, aarch64), plus an sdist. Asserts `manylinux2014` tags for broad Linux compatibility.
|
|
72
|
+
- **Native binaries** (`release-binaries.yml`): `x86_64-unknown-linux-gnu`, `x86_64-unknown-linux-musl`, `aarch64-unknown-linux-gnu`, `x86_64-apple-darwin`, `aarch64-apple-darwin`, `x86_64-pc-windows-msvc`.
|
|
73
|
+
- **npm binary bundling** (`npm-publish.yml` → `scripts/npm/bundle-binaries.js`): downloads the GitHub Release zips and lays them out as `vendor/<target>/corgea/corgea`. At runtime `bin/corgea.js` selects the binary for the host OS/arch. npm ships 5 of the 6 targets (Linux x64 uses the musl build).
|
|
74
|
+
|
|
75
|
+
## Release notes
|
|
76
|
+
|
|
77
|
+
There is **no automated changelog** — no `CHANGELOG.md`, no release-please/git-cliff, and the workflows do not set `generate_release_notes`. `release-binaries.yml` creates the GitHub Release with an **empty body**.
|
|
78
|
+
|
|
79
|
+
Generate notes with GitHub's built-in feature, either via `gh release create … --generate-notes` (step 4b) or the **"Generate release notes"** button when editing the release. The established format is:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
## What's Changed
|
|
83
|
+
* <PR title> by @<author> in <PR link>
|
|
84
|
+
...
|
|
85
|
+
**Full Changelog**: https://github.com/Corgea/cli/compare/<prev>...vX.Y.Z
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Release notes live on the GitHub Release, not in the repository, so updating them needs **no PR**.
|
|
89
|
+
|
|
90
|
+
## Post-release verification
|
|
91
|
+
|
|
92
|
+
Smoke-test every channel:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# npm
|
|
96
|
+
npm install -g @corgea/cli@X.Y.Z
|
|
97
|
+
corgea --version
|
|
98
|
+
|
|
99
|
+
# PyPI (isolated)
|
|
100
|
+
python3 -m venv /tmp/corgea-smoke
|
|
101
|
+
/tmp/corgea-smoke/bin/pip install corgea-cli==X.Y.Z
|
|
102
|
+
/tmp/corgea-smoke/bin/corgea --version
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Confirm registry state:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npm view @corgea/cli version dist-tags
|
|
109
|
+
python3 -m pip index versions corgea-cli
|
|
110
|
+
gh release view vX.Y.Z
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Rollback
|
|
114
|
+
|
|
115
|
+
Published package versions are **immutable** — you cannot overwrite `X.Y.Z` on npm or PyPI. **Roll forward:** fix, bump to the next patch (`X.Y.Z+1`), and release again. If a bad npm version must be discouraged, `npm deprecate '@corgea/cli@X.Y.Z' "reason"`.
|
|
116
|
+
|
|
117
|
+
## Known issues
|
|
118
|
+
|
|
119
|
+
- **npm idempotency guard checks the wrong name.** `npm-publish.yml` runs `npm view "corgea-cli@<version>"` (unscoped) to decide whether to skip, but the package is `@corgea/cli` (scoped). The guard never matches, so it never skips; re-running on an already-published version fails at `npm publish` instead of skipping cleanly. **Publishing itself is correct** (`npm publish` uses `package.json` → `@corgea/cli`), which is why releases succeed — only the skip optimization is broken. Fix: query `@corgea/cli`.
|
|
120
|
+
- **`bin/corgea.js` reinstall hint is wrong.** Its "binary missing" message says `npm install -g corgea-cli@latest`; the npm package is `@corgea/cli`. (`corgea-cli` is the *PyPI* name.)
|
|
121
|
+
- **npm auto-publish requires a `v`-prefixed tag.** Non-`v` tags build PyPI + binaries but skip npm; use the manual dispatch in step 5.
|
|
122
|
+
|
|
123
|
+
## Reference
|
|
124
|
+
|
|
125
|
+
- Workflows: `.github/workflows/release.yml`, `release-binaries.yml`, `npm-publish.yml`
|
|
126
|
+
- Quality gate: `./harness ci` (see `AGENTS.md`)
|
|
127
|
+
- Packaging: `Cargo.toml`, `pyproject.toml`, `package.json`, `bin/corgea.js`, `scripts/npm/bundle-binaries.js`
|
|
@@ -268,7 +268,7 @@ cmd_pre_commit() {
|
|
|
268
268
|
printf "\n%s[pre-commit]%s\n\n" "$BLUE" "$RESET"
|
|
269
269
|
# Check-only: never rewrite the working tree behind the commit.
|
|
270
270
|
# Mirrors the CI gate so anything that passes here passes there.
|
|
271
|
-
run "Clippy (strict)" 0 -- cargo clippy -- -D warnings
|
|
271
|
+
run "Clippy (strict)" 0 -- cargo clippy --all-targets -- -D warnings
|
|
272
272
|
run "Format check" 0 -- cargo fmt --check
|
|
273
273
|
cmd_test
|
|
274
274
|
}
|
|
@@ -282,7 +282,7 @@ cmd_check() {
|
|
|
282
282
|
[ $? -eq 0 ] && passed=$(( passed + 1 )) || failed=$(( failed + 1 ))
|
|
283
283
|
run "Format" 1 -- cargo fmt
|
|
284
284
|
[ $? -eq 0 ] && passed=$(( passed + 1 )) || failed=$(( failed + 1 ))
|
|
285
|
-
run "Clippy (strict)" 1 -- cargo clippy -- -D warnings
|
|
285
|
+
run "Clippy (strict)" 1 -- cargo clippy --all-targets -- -D warnings
|
|
286
286
|
[ $? -eq 0 ] && passed=$(( passed + 1 )) || failed=$(( failed + 1 ))
|
|
287
287
|
run_with_summary "Tests" 1 -- cargo test
|
|
288
288
|
[ $? -eq 0 ] && passed=$(( passed + 1 )) || failed=$(( failed + 1 ))
|
|
@@ -304,7 +304,7 @@ cmd_check() {
|
|
|
304
304
|
|
|
305
305
|
cmd_ci() {
|
|
306
306
|
printf "\n%s[ci]%s\n\n" "$BLUE" "$RESET"
|
|
307
|
-
run "Clippy (strict)" 0 -- cargo clippy -- -D warnings
|
|
307
|
+
run "Clippy (strict)" 0 -- cargo clippy --all-targets -- -D warnings
|
|
308
308
|
run "Format check" 0 -- cargo fmt --check
|
|
309
309
|
_cmd_audit_inner 1
|
|
310
310
|
if ! cargo llvm-cov --version >/dev/null 2>&1; then
|