Bug 284145 - security/cargo-audit: fails with "Unrecognized value 'nuttx' for target_os"
Summary: security/cargo-audit: fails with "Unrecognized value 'nuttx' for target_os"
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mikael Urankar
URL: https://github.com/rustsec/rustsec/is...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-18 22:41 UTC by Alan Somers
Modified: 2025-01-18 23:05 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (mikael)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Somers freebsd_committer freebsd_triage 2025-01-18 22:41:10 UTC
cargo-audit version 0.21.0_1,1 began to fail within the last day or so with the below error message.

> cargo-audit audit
    Fetching advisory database from `https://github.com/RustSec/advisory-db.git`
error: error loading advisory database: parse error: error parsing /home/somers/.cargo/advisory-db/crates/gix-worktree-state/RUSTSEC-2025-0001.md: parse error: TOML parse error at line 13, column 6
   |
13 | os = [
   |      ^
Unrecognized value 'nuttx' for target_os

ENVIRONMENT
===========
FreeBSD amd64, both 15.0-CURRENT and 14.2-RELEASE, both in an environment with a rustup toolchain installed and in an environment without.

STEPS TO REPRODUCE
==================
$ pkg install cargo-audit
$ cd /path/to/literally/anywhere
$ cargo-audit audit

ANALYSIS
========
The cargo-audit tool downloads a file provided by the RustSec team and updated on a regular basis.  It's the parsing of this file that is failing.  One possible solution would be for the RustSec team to rollback whatever recent change they made (adding nuttx?).  Another, I believe, would be for FreeBSD to rebuild the cargo-audit package to use the nightly toolchain.  I'll take the discussion upstream at https://github.com/rustsec/rustsec/ .
Comment 1 Alan Somers freebsd_committer freebsd_triage 2025-01-18 23:05:37 UTC
The RustSec team has agreed to backout the offending database change while they fix the tool, so there's nothing for FreeBSD to do right now.