upd-cli 0.1.10__tar.gz → 0.2.0__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.
- {upd_cli-0.1.10 → upd_cli-0.2.0}/CHANGELOG.md +11 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/Cargo.lock +1 -1
- {upd_cli-0.1.10 → upd_cli-0.2.0}/Cargo.toml +1 -1
- {upd_cli-0.1.10 → upd_cli-0.2.0}/PKG-INFO +1 -1
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/lib.rs +6 -4
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/schema.rs +5 -6
- {upd_cli-0.1.10 → upd_cli-0.2.0}/tests/exit_codes.rs +5 -5
- {upd_cli-0.1.10 → upd_cli-0.2.0}/tests/fix_audit.rs +5 -5
- {upd_cli-0.1.10 → upd_cli-0.2.0}/.mise.toml +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/.pre-commit-config.yaml +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/.pre-commit-hooks.yaml +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/.rumdl.toml +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/LICENSE +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/Makefile +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/README.md +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/assets/logo-wide.svg +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/assets/logo.svg +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/fixtures/clispec-v0.2.json +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/pyproject.toml +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/python/upd_cli/__init__.py +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/python/upd_cli/__main__.py +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/python/upd_cli/py.typed +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/rust-toolchain.toml +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/align.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/audit/cache.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/audit/cvss.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/audit/mod.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/bin/upd-cli.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/cache.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/cli.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/config.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/cooldown.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/http.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/interactive.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/lockfile.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/main.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/output.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/registry/crates_io.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/registry/github_releases.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/registry/go_proxy.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/registry/mock.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/registry/mod.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/registry/npm.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/registry/nuget.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/registry/pypi.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/registry/rubygems.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/registry/terraform.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/registry/utils.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/updater/cargo_toml.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/updater/csproj.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/updater/gemfile.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/updater/github_actions.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/updater/go_mod.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/updater/mise.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/updater/mod.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/updater/npm_range.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/updater/package_json.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/updater/pre_commit.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/updater/pyproject.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/updater/requirements.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/updater/terraform.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/version/compare.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/version/mod.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/version/pep440.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/version/semver_util.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/src/version/tag.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/tests/audit_offline.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/tests/audit_sarif.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/tests/audit_severity.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/tests/bump_filter.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/tests/cooldown_e2e.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/tests/discovery_no_ignore.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/tests/format_json.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/tests/help_text.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/tests/interactive_tty.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/tests/invalid_positional.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/tests/no_args_scope.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/tests/output_streams.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/tests/package_filter.rs +0 -0
- {upd_cli-0.1.10 → upd_cli-0.2.0}/vership.toml +0 -0
|
@@ -20,6 +20,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
+
|
|
24
|
+
## [0.2.0](https://github.com/rvben/upd/compare/v0.1.10...v0.2.0) - 2026-06-11
|
|
25
|
+
|
|
26
|
+
### Breaking Changes
|
|
27
|
+
|
|
28
|
+
- **audit**: give vulnerabilities_found its own exit code 6 as a declared outcome ([0037dc4](https://github.com/rvben/upd/commit/0037dc4e075f7d3cca7e51096fc11d07e1aa1cdb))
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- **audit**: give vulnerabilities_found its own exit code 6 as a declared outcome ([0037dc4](https://github.com/rvben/upd/commit/0037dc4e075f7d3cca7e51096fc11d07e1aa1cdb))
|
|
33
|
+
|
|
23
34
|
## [0.1.10](https://github.com/rvben/upd/compare/v0.1.9...v0.1.10) - 2026-06-11
|
|
24
35
|
|
|
25
36
|
### Added
|
|
@@ -53,15 +53,17 @@ pub fn decide_exit_code(non_mutating: bool, has_pending_updates: bool, has_error
|
|
|
53
53
|
///
|
|
54
54
|
/// - `2` — scan errors occurred; errors take precedence over vulnerability
|
|
55
55
|
/// findings so that CI can distinguish a broken scan from a clean one.
|
|
56
|
-
/// - `
|
|
57
|
-
/// the update exit codes (1 = pending updates,
|
|
58
|
-
///
|
|
56
|
+
/// - `6` — vulnerabilities were found and `no_fail` is `false`; a dedicated
|
|
57
|
+
/// code, distinct from the update exit codes (1 = pending updates,
|
|
58
|
+
/// 2 = errors) and from the error exit codes declared in the schema, so
|
|
59
|
+
/// callers can branch on the exit code alone. Declared as the
|
|
60
|
+
/// `vulnerabilities_found` outcome in the schema.
|
|
59
61
|
/// - `0` — no vulnerabilities found, or `no_fail` suppresses the non-zero exit.
|
|
60
62
|
pub fn decide_audit_exit_code(vuln_count: usize, error_count: usize, no_fail: bool) -> i32 {
|
|
61
63
|
if error_count > 0 {
|
|
62
64
|
2
|
|
63
65
|
} else if vuln_count > 0 && !no_fail {
|
|
64
|
-
|
|
66
|
+
6
|
|
65
67
|
} else {
|
|
66
68
|
0
|
|
67
69
|
}
|
|
@@ -256,6 +256,11 @@ fn build_schema() -> Value {
|
|
|
256
256
|
"code": 1,
|
|
257
257
|
"name": "updates_available",
|
|
258
258
|
"description": "Updates are available (dry-run mode only); the report is on stdout. Not an error. Run with --apply to write changes"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"code": 6,
|
|
262
|
+
"name": "vulnerabilities_found",
|
|
263
|
+
"description": "Security vulnerabilities found during audit; the report is on stdout. Not an error. Use --no-fail to exit 0 instead"
|
|
259
264
|
}
|
|
260
265
|
],
|
|
261
266
|
"errors": [
|
|
@@ -282,12 +287,6 @@ fn build_schema() -> Value {
|
|
|
282
287
|
"description": "Version conflict detected between files",
|
|
283
288
|
"exit_code": 5,
|
|
284
289
|
"retryable": false
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
"kind": "vulnerabilities_found",
|
|
288
|
-
"description": "Security vulnerabilities found during audit (use --no-fail to suppress non-zero exit)",
|
|
289
|
-
"exit_code": 3,
|
|
290
|
-
"retryable": false
|
|
291
290
|
}
|
|
292
291
|
]
|
|
293
292
|
})
|
|
@@ -344,8 +344,8 @@ fn decide_audit_exit_code_clean() {
|
|
|
344
344
|
#[test]
|
|
345
345
|
fn decide_audit_exit_code_vulns_without_no_fail() {
|
|
346
346
|
use upd::decide_audit_exit_code;
|
|
347
|
-
assert_eq!(decide_audit_exit_code(1, 0, false),
|
|
348
|
-
assert_eq!(decide_audit_exit_code(162, 0, false),
|
|
347
|
+
assert_eq!(decide_audit_exit_code(1, 0, false), 6);
|
|
348
|
+
assert_eq!(decide_audit_exit_code(162, 0, false), 6);
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
/// Unit test: vulns found, --no-fail present → exit 0.
|
|
@@ -388,7 +388,7 @@ fn audit_on_empty_workspace_exits_zero() {
|
|
|
388
388
|
/// A wiremock server stands in for the OSV API and reports one vulnerability
|
|
389
389
|
/// for `requests==1.0.0`.
|
|
390
390
|
#[tokio::test]
|
|
391
|
-
async fn
|
|
391
|
+
async fn audit_with_vulns_exits_six() {
|
|
392
392
|
use wiremock::matchers::{method, path};
|
|
393
393
|
use wiremock::{Mock, MockServer, ResponseTemplate};
|
|
394
394
|
|
|
@@ -422,8 +422,8 @@ async fn audit_with_vulns_exits_three() {
|
|
|
422
422
|
);
|
|
423
423
|
|
|
424
424
|
assert_eq!(
|
|
425
|
-
code,
|
|
426
|
-
"audit with vulns must exit
|
|
425
|
+
code, 6,
|
|
426
|
+
"audit with vulns must exit 6, the vulnerabilities_found outcome (no --no-fail); stderr: {stderr}"
|
|
427
427
|
);
|
|
428
428
|
}
|
|
429
429
|
|
|
@@ -159,9 +159,9 @@ async fn fix_audit_dry_run_exits_1_and_leaves_file_unchanged() {
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
/// When a vulnerability has no `fixed_version`, emit a warning and don't touch the file.
|
|
162
|
-
/// Falls through to normal audit exit code (
|
|
162
|
+
/// Falls through to normal audit exit code (6 = vulnerabilities_found outcome, !no_fail).
|
|
163
163
|
#[tokio::test]
|
|
164
|
-
async fn
|
|
164
|
+
async fn fix_audit_no_fixed_version_warns_and_exits_6() {
|
|
165
165
|
use wiremock::matchers::{method, path};
|
|
166
166
|
use wiremock::{Mock, MockServer, ResponseTemplate};
|
|
167
167
|
|
|
@@ -198,10 +198,10 @@ async fn fix_audit_no_fixed_version_warns_and_exits_3() {
|
|
|
198
198
|
);
|
|
199
199
|
|
|
200
200
|
// No fixable packages → falls through to normal audit exit code.
|
|
201
|
-
// Normal audit with vulnerabilities and !no_fail → exit
|
|
201
|
+
// Normal audit with vulnerabilities and !no_fail → exit 6.
|
|
202
202
|
assert_eq!(
|
|
203
|
-
code,
|
|
204
|
-
"should exit
|
|
203
|
+
code, 6,
|
|
204
|
+
"should exit 6 (vulnerabilities_found outcome, no fix available); stdout: {stdout}\nstderr: {stderr}"
|
|
205
205
|
);
|
|
206
206
|
|
|
207
207
|
let content = fs::read_to_string(&req_path).unwrap();
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|