Skip to main content

CLI-based AUR package update vetting tool

Project description

TrustSight

TrustSight

Audits AUR PKGBUILDs before you update: catches careless malice and structural risk, and tells you what it can't verify.

Python License DeepWiki Tests PyPI


The 30-second example

trustsight review
                        TrustSight Review
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Package         ┃ Risk Score   ┃ Verdict                                   ┃
┃                 ┃              ┃                                           ┃
┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ chez-scheme-bin │   0/100      │ Version bump. No structural changes.      │
├─────────────────┼──────────────┼───────────────────────────────────────────┤
│ sketchy-pkg     │  35/100      │ R004 HIGH  Checksum disabled (SKIP).      │
│                 │              │ C003 INFO  Source URL changed without     │
│                 │              │            version bump.                  │
│                 │              │ SOURCE_BUCKET MEDIUM  New domain:         │
│                 │              │   sketchy-cdn.invalid (unknown).          │
│                 │              │ NOVELTY HIGH  Source URL first seen       │
│                 │              │   globally.                               │
│                 │              │ PINNING INFO  Source pinning: unpinned.   │
│                 │              │ Verdict: Checksum disabled; sources       │
│                 │              │   replaced with content from an unknown,  │
│                 │              │   never-before-seen domain.               │
├─────────────────┼──────────────┼───────────────────────────────────────────┤
│ obsidian-beta   │  15/100      │ INCONCLUSIVE. Only 2 prior observations;  │
│                 │              │ no high-severity signals from a cold DB.  │
└─────────────────┴──────────────┴───────────────────────────────────────────┘

The tiered evidence display is the differentiator: every signal (rule, bucket, novelty, pinning, verification) is shown with its contribution and severity. You see why the score is what it is.


What it catches / what it can't

Detected by TrustSight Outside TrustSight's scope
Careless malice: curl | bash, base64 | sh, wget pipe sh (R001 recall ~100%). Obfuscated casing, embedded URLs in function bodies. Signed upstream payload: the PKGBUILD is not the binary. A benign build file can fetch a tampered release tarball.
Structural risk: checksums disabled (R004), checksums emptied (R005), URL typosquatting (githab.com), source URLs swapped without a version bump (C003). Deliberately-unremarkable PKGBUILDs: no added commands, no new URLs, no checksum changes; no signal. The update is invisible to diff analysis.
Anomaly-vs-history: first-seen URLs (global or per-package), first-seen maintainer, low-observation-count gating with INCONCLUSIVE verdict. Build-dependency attacks: a malicious makedepends or depends is outside PKGBUILD scope. TrustSight audits the recipe, not the supply chain's second-order dependencies.
Reviewer manipulation: Unicode bidi overrides (R013, 88% recall) that make displayed text differ from executed text. Prompt injection in comments/descriptions (R012, 17% recall; kept as tripwire; primary defense is verdict-integrity assertions). Unpinned sources result in INCONCLUSIVE. A source=($pkgname-$pkgver.tar.gz) with no checksum, tag, or commit pin is reported as structurally weak, not silently accepted.

Install

pip install trustsight

AUR: trustsight (dogfood: TrustSight audits its own updates).

From source:

git clone https://github.com/emiliano-go/trustsight
cd trustsight
pip install -e .

Requires Python 3.12+.


Commands

Command What it does
trustsight review Scan all outdated AUR packages and produce a scored table with tiered evidence.
trustsight inspect <package> Deep-dive on a single package: full score breakdown, source URLs, resolved commands, novelty context.
trustsight history <package> Show past analysis results for a package, with optional --score-breakdown.

How scoring works

Scoring is deterministic: same input always produces the same score. A core of 13 detection rules (R001 to R013) and 3 code-structure rules (C001 to C003) produces signals across four evidence tiers: A (structural, rules on PKGBUILD lines), B (priors/context, URL classification and forge trust), C (history/novelty, first-seen URLs and maintainers gated by observation count), and D (verification, checksums, PGP keys, GPG verify, which subtract from the score). The LLM is entirely optional and never calculates; it translates the deterministic breakdown into English, and verdict-integrity assertions gate its output. See scoring-philosophy.md.


Security model

TrustSight is evidence-producing, not proof-of-safety. It audits and does not install. The tool never runs the PKGBUILD, never executes extracted commands, and never modifies your system. Every finding is traceable to a specific diff line, URL, or novelty record. The output is a structured risk assessment to inform your decision, not a gate. See trust-model.md.


License

MIT. Deliberately permissive to encourage adoption, auditing, and fork-investigation by the Arch Linux and security communities.


Documentation hub

Section Description
Getting Started One-tutorial path from install to first review
Full documentation Docs landing page
Contributing How to report bugs, contribute code, improve docs
Security Vulnerability disclosure policy
License MIT full text

Project details


Download files

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

Source Distribution

trustsight-0.2.0.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trustsight-0.2.0-py3-none-any.whl (33.0 kB view details)

Uploaded Python 3

File details

Details for the file trustsight-0.2.0.tar.gz.

File metadata

  • Download URL: trustsight-0.2.0.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for trustsight-0.2.0.tar.gz
Algorithm Hash digest
SHA256 27b8db7eb8b196acc6f84c6337777d0238297132794488f7990e6ddb9d7e22da
MD5 cf5df9659483ffa74bfb7dffe73d42db
BLAKE2b-256 514a30129fed3a66048c1bab1e2c829eae9b3be55f6e3dbbcabaca41e648f9ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for trustsight-0.2.0.tar.gz:

Publisher: publishing.yml on emiliano-go/trustsight

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

File details

Details for the file trustsight-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: trustsight-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 33.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for trustsight-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 195314fdc039877084e9e91e72b2ab5c1dc6a562be79cf8a4036a19924a5e4c1
MD5 a8956ae985ba0d4a2a0fb445cc0f5191
BLAKE2b-256 5f010eef52f6ee61338832c7995dc9844776cb69081aaa27c442664c4f3d1531

See more details on using hashes here.

Provenance

The following attestation bundles were made for trustsight-0.2.0-py3-none-any.whl:

Publisher: publishing.yml on emiliano-go/trustsight

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 Pingdom Monitoring Sentry Error logging StatusPage Status page