Skip to content
Open-Source Registry

cargo / rustpython-vm

rustpython-vm 0.6.0

bitbison: clean, behavior clean, dependencies clean, posture not checked, pipeline clean, 1 of 1 jobs captured RisknoneVulnsnone
processes
511
operations
53K
packages
239
compiler runs
300
connections
2
build time
0s
capture
659 KB
records
94K
bytes / record
7.0

RustPython virtual machine.

Build behaviourits build script ran gitcompiled C/C++

158,299 downloads · MIT · published 2026-10-02 · source View on crates.io
Reviewed by Bitbison: secrets-exposureThe build script copies every environment variable of the build into the library. CI tokens and cloud keys present at build time end up inside the binary. Python code can read them with sysconfig.get_config_vars(). Fixed in 0.6.0. The review covers 0.3.0, 0.3.1, 0.4.0 and 0.5.0, not 0.6.0.

Artifact

file · retained · product · graph v2
1

Checks

11 of 14 clear · 3 not checked
Build behavior✓✓✓✓✓✓✓✓
Supply chain○○○✓✓
Pipeline✓

Detections

0

No detections

No abnormal activity detected across 53K flows.

Network

2 peers
  • static.crates.io:443 the package manager · cargo (rustpython-vm) via crates.io · 11,678 files · went into an output ecosystem
  • 10.0.2.3:53 the package manager · cargo (rustpython-vm) via DNS resolution (local resolver) infrastructure
Dependencies247Build behaviour
aho-corasick1.1.4
ar_archive_writer0.5.2
arrayvec0.7.8
ascii1.1.0
attribute-derive0.10.5
attribute-derive-macro0.10.5proc macro
autocfg1.5.1
bitflags1.3.2
bitflags2.13.1
bitflagset0.0.4
bstr1.13.0
bumpalo3.20.3
bytemuck1.25.0
castaway0.2.4
cc1.2.66
cfg-if1.0.4
cfg_aliases0.2.1
char_str0.0.2
clipboard-win5.4.1
collection_literals1.0.3
compact_str0.10.0
constant_time_eq0.6.0build script
core-foundation0.10.1
core-foundation-sys0.8.7
crossbeam-utils0.8.23build script
crunchy0.2.4build script, not run
defmt1.1.1build script, not run
defmt-macros1.1.1build script, not runproc macro
defmt-parser1.0.0
derive-where1.6.1proc macro
displaydoc0.2.6proc macro
dns-lookup4.0.1
drop_bomb0.1.5
either1.16.0
endian-type0.2.0
equivalent1.0.2
errno0.3.14
error-code3.3.2
find-msvc-tools0.1.9
foldhash0.2.0
futures-core0.3.32
futures-task0.3.32
futures-util0.3.32
get-size-derive20.10.3proc macro
get-size20.10.3
gethostname1.1.0
getopts0.2.24
getrandom0.2.17
getrandom0.4.3build script
glob0.3.3
half2.7.1
hashbrown0.16.1
hashbrown0.17.1
heck0.5.0
hermit-abi0.5.2
hex0.4.3
hexf-parse0.2.1
home0.5.12
icu_casemap2.2.0
icu_casemap_data2.2.0build script
icu_collections2.2.0
icu_locale2.2.0
icu_locale_core2.2.0
icu_locale_data2.2.0build script
icu_normalizer2.2.0
icu_normalizer_data2.2.0build script
icu_properties2.2.0
icu_properties_data2.2.0build script
icu_provider2.2.0
indexmap2.14.0
interpolator0.5.0
is-macro0.3.8proc macro
itertools0.14.0
itertools0.15.0
itoa1.0.18
jiff0.2.37
jiff-core0.1.0
jiff-static0.2.37proc macro
jiff-tzdb0.1.8
jiff-tzdb-platform0.1.3
js-sys0.3.103
junction2.0.0
ld-linux-x86-64.so.2system library
lexical-parse-float1.0.6
lexical-parse-integer1.0.6
lexical-util1.0.7
libc0.2.189build script
libc.so.6system library
libffi5.2.0
libffi-sys4.2.0build script
libgcc_s.so.1system library
libloading0.9.0
libm0.2.16build script
libm.so.6system library
libmvec.so.1system library
linux-raw-sys0.12.1
litemap0.8.2
lock_api0.4.14
log0.4.33
lz4_flex0.14.0
mac_address1.1.8
malachite-base0.12.0
malachite-bigint0.12.0
malachite-nz0.12.0build script
malachite-q0.12.0
manyhow0.11.4
manyhow-macros0.11.4proc macro
memchr2.8.3
memmap20.9.11
memoffset0.9.1build script
nibble_vec0.1.0
nix0.29.0build script
nix0.31.3build script
num-complex0.4.6
num-integer0.1.47
num-traits0.2.19build script
num_cpus1.17.0
num_enum0.7.6
num_enum_derive0.7.6proc macro
object0.37.3build script
once_cell1.21.4
optional0.5.0
ordermap1.2.0
parking_lot0.12.5
parking_lot_core0.9.12build script
paste1.0.15build scriptproc macro
phf0.11.3
phf_codegen0.11.3
phf_generator0.11.3
phf_shared0.11.3
pin-project-lite0.2.17
pmutil0.6.1
portable-atomic1.13.1build script, not run
portable-atomic-util0.2.7build script, not run
potential_utf0.1.5
ppv-lite860.2.21
proc-macro-utils0.10.0
proc-macro21.0.107build script
psm0.1.32build scriptprebuilt objects
quote1.0.47build script
quote-use0.8.4
quote-use-macros0.8.4proc macro
r-efi6.0.0
radium1.1.1
radix_trie0.3.0
rand0.8.6
rand_chacha0.3.1
rand_core0.6.4
rapidhash4.5.1
redox_syscall0.5.18
ref-cast1.0.25build script
ref-cast-impl1.0.25proc macro
regex-automata0.4.14
result-like0.5.1
result-like-derive0.5.1proc macro
rustc-hash2.1.3
rustix1.1.4build script
rustpython-codegen0.6.0
rustpython-common0.6.0
rustpython-compiler0.6.0
rustpython-compiler-core0.6.0
rustpython-derive0.6.0proc macro
rustpython-derive-impl0.6.0
rustpython-doc0.6.0build script
rustpython-host_env0.6.0build script
rustpython-literal0.6.0
rustpython-ruff_python_ast0.16.5
rustpython-ruff_python_parser0.16.5
rustpython-ruff_python_trivia0.16.5
rustpython-ruff_source_file0.16.5
rustpython-ruff_text_size0.16.5
rustpython-sre_engine0.6.0
rustpython-unicode0.6.0build script
rustpython-wtf80.6.0
rustversion1.0.23build scriptproc macro
rustyline18.0.1
ryu1.0.23
safe_arch1.0.0
schannel0.1.29
scopeguard1.2.0
serde1.0.228build script, not run
serde_core1.0.228build script, not run
serde_derive1.0.228proc macro
shlex2.0.1
siphasher1.0.3
slab0.4.12
smallvec1.15.2
socket20.6.4
stable_deref_trait1.2.1
stacker0.1.25build script
static_assertions1.1.0
strum0.28.0
strum_macros0.28.0proc macro
syn2.0.119
syn3.0.3
syn-ext0.5.0
synstructure0.13.2
system-configuration0.8.0
system-configuration-sys0.6.0build script, not run
termios0.3.3
textwrap0.16.4
thin-vec0.2.19
thiserror2.0.21build script
thiserror-impl2.0.21proc macro
tinystr0.8.3
tinyvec1.11.0
tinyvec_macros0.1.1
twox-hash2.1.2
unicode-ident1.0.24
unicode-normalization0.1.25
unicode-segmentation1.13.3
unicode-width0.2.2
unicode_names21.3.0build script
unicode_names23.1.0build script
unicode_names2_generator1.3.0
unicode_names2_generator3.1.0
utf16_iter1.0.5
utf8_iter1.0.4
utf8parse0.2.2
wasi0.11.1+wasi-snapshot-preview1
wasm-bindgen0.2.126build script, not run
wasm-bindgen-macro0.2.126proc macro
wasm-bindgen-macro-support0.2.126
wasm-bindgen-shared0.2.126build script, not run
which8.0.5
wide1.5.0
widestring1.2.1
winapi0.3.9build script, not run
winapi-i686-pc-windows-gnu0.4.0build script, not run
winapi-x86_64-pc-windows-gnu0.4.0build script, not run
windows-link0.2.1
windows-sys0.61.2
write161.0.0
writeable0.6.4
xz0.4.6-rc.0
xz-core0.1.0-rc.0
yoke0.8.3
yoke-derive0.8.2proc macro
zerocopy0.8.53build script
zerocopy-derive0.8.53proc macro
zerofrom0.1.8
zerofrom-derive0.1.7proc macro
zerotrie0.2.4
zerovec0.11.6
zerovec-derive0.11.3proc macro
zlib-rs0.6.8
zmij1.0.21build script
Versions2RiskVulnsPublished
0.5.02d ago
0.6.0nonenone

Raw data

capture
659 KB
records
93,712
bytes per record
7.0

Loading a sample of the capture

Want to see more? E-mail us at hello@bitbison.io about your use case.

1 of 1 jobs captured: build-test success · Generated 2026-10-19 · run baaa4f30-eb62-435a-b239-c109efdab6f7-import-1792433881503

analysis 0.1.0+g5e95e5a0b4a6.dirty · graph v2

rustpython-vm 0.3.0 to 0.5.0 puts the build environment inside every program that links it

secrets-exposureCovers 0.3.0, 0.3.1, 0.4.0 and 0.5.0Reviewed by BitbisonUpdated 2026-10-19

The build script copies every environment variable of the build into the library. CI tokens and cloud keys present at build time end up inside the binary. Python code can read them with sysconfig.get_config_vars(). Fixed in 0.6.0.

What the code does

The build script of rustpython-vm 0.3.0 through 0.5.0 writes every environment variable of the build into $OUT_DIR/env_vars.rs:

let mut env_path = PathBuf::from(env::var_os("OUT_DIR").unwrap());
env_path.push("env_vars.rs");
let mut f = std::fs::File::create(env_path).unwrap();
write!(f, "sysvars! {{ {} }}",
    std::env::vars_os().format_with(", ", |(k, v), f| f(&format_args!("{k:?} => {v:?}"))))

The library compiles that file in. In 0.5.0 the include is at src/stdlib/_sysconfigdata.rs, line 72, inside build_time_vars. In 0.3.0, 0.3.1 and 0.4.0 it is at src/stdlib/sysconfigdata.rs, line 22. The module is always compiled. No feature turns it off.

Every variable set when cargo ran the build script becomes a string in librustpython_vm.rlib. It is also in every program that links the library. Python code running on that interpreter can read them with sysconfig.get_config_vars().

What this means

A build environment often holds secrets. CARGO_REGISTRY_TOKEN, GITHUB_TOKEN, AWS keys, API keys, database URLs. When such a program is built in CI and shipped, those secrets ship inside it in clear text. Anyone with the binary can read them with strings. Any Python code the program runs can read them through sysconfig.

We confirmed it in our own build of outl-exec 0.13.0-beta.256, which builds rustpython-vm 0.5.0. Our sandbox plants marked fake credentials in the build environment. After the build, the marker was in out/env_vars.rs, in librustpython_vm.rlib, and in every test binary that linked it.

We also checked public release binaries of four projects that depend on these versions. Every one of them contains the full environment of the GitHub Actions job that built it.

Conclusion

This is not malicious. The dump existed to give sysconfig the build configuration. The authors removed it as soon as it was reported (issue #8802, PR #8813, merged 2026-09-24). Version 0.6.0, published 2026-10-02, no longer writes or includes the file. We checked its source.

The problem stands for every release before 0.6.0 that anyone still builds. There is no RustSec advisory. cargo audit does not warn about it. These are 0.x versions. A ^0.5 or ^0.4 requirement never upgrades to 0.6.0 on its own.

What to do

If you build a program on rustpython-vm 0.5.0 or earlier:

  1. Upgrade to 0.6.0 or later.
  2. Rebuild and ship new binaries.
  3. If a binary built in CI left the build machine, treat every secret that was in that job's environment as exposed. Rotate it.
  4. Until you upgrade, build with a clean environment. env -i with only what the build needs.

Versions

  • 0.1.0, 0.1.1, 0.1.2 (yanked): no dump.
  • 0.3.0, 0.3.1, 0.4.0, 0.5.0: dump written and compiled in.
  • 0.6.0: fixed.

Indicators

files
env_vars.rs
symbols
_sysconfigdata.build_time_varssysconfig.get_config_vars

Examined

0.3.0
sha256:e2d39e99834033f1313cf80279a7d37f7a83b56a5fad8194f20790bdf303419a
0.3.1
sha256:d304aecce4f914def54abf331e458ee99f611b862580acb0c448e67a8237d28d
0.4.0
sha256:2878cc4b5679f35fa762891d812ca7e011ae7cd41b5c532eb0ad13959b522493
0.5.0
sha256:1880770161cef896bf9c7e065dae574e3b4c3cf6172e485f1ce86f0483816ab2

Links