Skip to main content

A python package that extracts rust audit information from rust audit based executables.

Dependency note: this package is being deprecated in favor of the unified package pygorpmrustinfo. If you depend on this package in another project, update your dependency declaration (for example in requirements, pyproject.toml, setup.cfg, or setup.py) to depend on pygorpmrustinfo instead. The unified package preserves the existing functionality while avoiding the multiple-Go-runtime risk discussed in Go issue #65050 and reducing memory usage.

Example usage

from pyrustaudit import get_rust_audit
import json


def test_get_info(file):
    res = get_rust_audit(file)
    print(json.dumps(res, indent=4))


test_get_info("foo/bar")
test_get_info("/usr/bin/du")
test_get_info("test-data/centos5-plain-Packages")

The result returned is always a dict object for errors the dictionary returned contains a key; "error" like;

{
    "error": "path error:foo/bar"
}

or

{
    "error": "/usr/bin/du: could not read Go build info from /usr/bin/du: unrecognized file format"
}

on success a python dict is rturned like this

{
    "packages": [
        {
            "name": "adler",
            "version": "1.0.2",
            "source": "registry",
            "kind": "build",
            "dependencies": null,
            "features": null,
            "root": false
        },
        {
            "name": "auditable",
            "version": "0.1.0",
            "source": "registry",
            "kind": "runtime",
            "dependencies": null,
            "features": null,
            "root": false
        },
        {
            "name": "auditable-build",
            "version": "0.1.0",
            "source": "registry",
            "kind": "build",
            "dependencies": [
                3,
                5,
                7,
                15
            ],
            "features": null,
            "root": false
        },
        {
            "name": "auditable-serde",
            "version": "0.1.0",
            "source": "registry",
            "kind": "build",
            "dependencies": [
                5,
                11,
                13,
                15
            ],
            "features": [
                "cargo_metadata",
                "default",
                "from_metadata"
            ],
            "root": false
        },
        {
            "name": "autocfg",
            "version": "1.2.0",
            "source": "registry",
            "kind": "build",
            "dependencies": null,
            "features": null,
            "root": false
        },
        {
            "name": "cargo_metadata",
            "version": "0.11.4",
            "source": "registry",
            "kind": "build",
            "dependencies": [
                11,
                13,
                15
            ],
            "features": [
                "default"
            ],
            "root": false
        },
        {
            "name": "itoa",
            "version": "1.0.11",
            "source": "registry",
            "kind": "build",
            "dependencies": null,
            "features": null,
            "root": false
        },
        {
            "name": "miniz_oxide",
            "version": "0.4.4",
            "source": "registry",
            "kind": "build",
            "dependencies": [
                0,
                4
            ],
            "features": null,
            "root": false
        },
        {
            "name": "proc-macro2",
            "version": "1.0.79",
            "source": "registry",
            "kind": "build",
            "dependencies": [
                18
            ],
            "features": [
                "proc-macro"
            ],
            "root": false
        },
        {
            "name": "quote",
            "version": "1.0.35",
            "source": "registry",
            "kind": "build",
            "dependencies": [
                8
            ],
            "features": [
                "proc-macro"
            ],
            "root": false
        },
        {
            "name": "ryu",
            "version": "1.0.17",
            "source": "registry",
            "kind": "build",
            "dependencies": null,
            "features": null,
            "root": false
        },
        {
            "name": "semver",
            "version": "0.10.0",
            "source": "registry",
            "kind": "build",
            "dependencies": [
                12,
                13
            ],
            "features": [
                "default",
                "serde"
            ],
            "root": false
        },
        {
            "name": "semver-parser",
            "version": "0.7.0",
            "source": "registry",
            "kind": "build",
            "dependencies": null,
            "features": null,
            "root": false
        },
        {
            "name": "serde",
            "version": "1.0.197",
            "source": "registry",
            "kind": "build",
            "dependencies": [
                14
            ],
            "features": [
                "default",
                "derive",
                "serde_derive",
                "std"
            ],
            "root": false
        },
        {
            "name": "serde_derive",
            "version": "1.0.197",
            "source": "registry",
            "kind": "build",
            "dependencies": [
                8,
                9,
                16
            ],
            "features": [
                "default"
            ],
            "root": false
        },
        {
            "name": "serde_json",
            "version": "1.0.115",
            "source": "registry",
            "kind": "build",
            "dependencies": [
                6,
                10,
                13
            ],
            "features": [
                "default",
                "std"
            ],
            "root": false
        },
        {
            "name": "syn",
            "version": "2.0.58",
            "source": "registry",
            "kind": "build",
            "dependencies": [
                8,
                9,
                18
            ],
            "features": [
                "clone-impls",
                "derive",
                "parsing",
                "printing",
                "proc-macro"
            ],
            "root": false
        },
        {
            "name": "test-data",
            "version": "0.1.0",
            "source": "local",
            "kind": "runtime",
            "dependencies": [
                1,
                2
            ],
            "features": null,
            "root": false
        },
        {
            "name": "unicode-ident",
            "version": "1.0.12",
            "source": "registry",
            "kind": "build",
            "dependencies": null,
            "features": null,
            "root": false
        }
    ]
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrustaudit-0.0.14.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file pyrustaudit-0.0.14.tar.gz.

File metadata

  • Download URL: pyrustaudit-0.0.14.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyrustaudit-0.0.14.tar.gz
Algorithm Hash digest
SHA256 19a6798f274554f5776fb79421cccf2981340c1c8c62db88a795c2660c2dab07
MD5 9bd1c2901073bd3aedd127702a9a1231
BLAKE2b-256 8d191cbe8d4a758303b4e3e3b0a91e8b406460c7c95e3fe58970bcd521d5c857

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrustaudit-0.0.14.tar.gz:

Publisher: build_wheels.yml on MikeMoore63/pyrustaudit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page