TrustSight
Audits AUR PKGBUILD updates before you install: detects structural changes, suspicious commands, typosquatting, and novelty signals, then produces a deterministic risk score with a plain-English explanation.
Setup
# 1. Install
git clone https://github.com/emiliano-go/trustsight.git
cd trustsight/packaging/aur
makepkg -si
# 2. Scan your outdated AUR packages
trustsight review
Requires Python 3.11+ and Arch Linux (the tool discovers packages via pacman -Qm, pacman -Sl for local repos, or --repo/--all-repos flags).
The score is always deterministic and calculated locally. Verdicts are template-based, describing each finding in plain English, for example "Version bump. modified PKGBUILD, .SRCINFO. Signals: checksum disabled; novel dependency 'pyfoo' added in depends."
Not published to the AUR yet. Build from the PKGBUILD in this repository. Also installable via
pip install trustsight.
What it detects
| Attack / Risk | How TrustSight catches it |
|---|---|
Piped shell scripts (curl | bash, base64 | sh) |
Scans every new or changed line for command-subprocess pipelines (R001, ~100% recall on known cases) |
Obfuscated commands (encoded strings, environment subversion like LD_PRELOAD) |
Resolves variables and decodes known obfuscation patterns; flags build-environment tampering (R007, R070) |
| Checksum disabled or removed | Compares old vs new sha256sums / md5sums arrays (R004, R005) |
Source URL typosquatting (githab.com instead of github.com) |
Character-level edit distance against known forge domains (R008) |
Package-name typosquatting (e.g. libuvc resembling libuv) |
Edit-distance comparison against more popular packages in the seed database (R074) |
| URL swapped without a version bump | Tracks source URL changes that are not accompanied by a new version (C003) |
| Novel / never-before-seen URLs or maintainers | Compares against a bundled seed of 178,491 known AUR source URLs; flags first-seen domains and maintainers (novelty tier) |
| Unicode bidi override attacks (invisible characters that change how text displays) | Detects directionality overrides and homoglyph codepoints in PKGBUILD content (R013) |
| LLM prompt injection in package metadata | Pattern-matches common injection templates; primary defense is structural (the LLM cannot change the score) (R012) |
| GPG verification removed | Detects when validpgpkeys was populated and is now empty (R069) |
| Untrusted maintainer takeover | A maintainer change to someone never seen before (R071) |
| Stale package revived | A package with no updates for over a year suddenly gets one (R067) |
| Accelerated release cadence | 3+ commits in the last 24 hours (R073, informational) |
What it cannot detect
| Limitation | Why |
|---|---|
| Malicious upstream release tarballs | TrustSight audits the PKGBUILD, not the binaries it downloads. A clean build file can point to a compromised tarball. |
| Deliberately unremarkable attacks | If no commands are added, no URLs change, and no checksums are disabled, there is no diff signal. The update is invisible to this kind of analysis. |
| Build-dependency attacks | A malicious makedepends or depends entry is outside TrustSight's scope. It audits the recipe, not the second-order supply chain. |
| Runtime attacks | The tool never executes the PKGBUILD, never runs extracted commands, and never modifies your system. |
| Zero-day structural attacks | Rules are pattern-based and calibrated against a known corpus. A novel attack that leaves no matching pattern will not fire. |
The output is a risk assessment, not a proof of safety. A clean score means no known risk signals fired, not that the package is safe. See the trust model for details.
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.
Commands
| Command | What it does |
|---|---|
trustsight review |
Scan outdated AUR packages and produce a scored table with tiered evidence. Supports --repo, --foreign, --all-repos, --verbose flags. |
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. |
trustsight config set |
Set individual config keys. |
trustsight seed-db |
Import the bundled URL database for novelty detection. Runs automatically on first review. |
trustsight list |
List all packages tracked in the database. |
trustsight status |
Show database and system health statistics. |
trustsight db |
Database maintenance (check, vacuum, backup). |
trustsight override |
Suppress a rule that misfires on your packages. |
trustsight lint-rules |
Check rules.toml for unreachable or malformed rules. |
How scoring works
Scoring is fully deterministic: same input always produces the same score. The pipeline is:
- Diff the old and new PKGBUILD
- Apply rules to detect structural changes, suspicious commands, typosquatting, etc.
- Classify URLs into trust buckets (official, self-hosted, unknown, homograph)
- Check novelty against the local database of known URLs and maintainers
- Calculate score from 0-100 by summing weighted contributions across four evidence tiers
Signals come from 13 detection rules (R001-R013), 21 expanded rules (R039-R059) calibrated against a 3,322-diff corpus of benign AUR updates, and 7 code-structure rules (C001-C007).
Verdicts are template-based, describing each triggered finding in plain English. The score is never influenced by the verdict text.
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
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 |
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trustsight-0.11.0.tar.gz.
File metadata
- Download URL: trustsight-0.11.0.tar.gz
- Upload date:
- Size: 24.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
526e7b99dddea9e66b22e3d0f8a75a25b5f122f2b98c22aac3c29f196b803081
|
|
| MD5 |
6153f652285bf21176365c7e5d2c65a6
|
|
| BLAKE2b-256 |
6dbdd0bd2e633f05dde0d2daddcbec0b1ee96c15b0bd1a45be1fe0f1d0ac2561
|
Provenance
The following attestation bundles were made for trustsight-0.11.0.tar.gz:
Publisher:
publishing.yml on emiliano-go/trustsight
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trustsight-0.11.0.tar.gz -
Subject digest:
526e7b99dddea9e66b22e3d0f8a75a25b5f122f2b98c22aac3c29f196b803081 - Sigstore transparency entry: 2291582627
- Sigstore integration time:
-
Permalink:
emiliano-go/trustsight@36ecc9d2d08e601319dd9473bccc6f3d65cebd8b -
Branch / Tag:
refs/tags/v0.11.0 - Owner: https://github.com/emiliano-go
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publishing.yml@36ecc9d2d08e601319dd9473bccc6f3d65cebd8b -
Trigger Event:
release
-
Statement type:
File details
Details for the file trustsight-0.11.0-py3-none-any.whl.
File metadata
- Download URL: trustsight-0.11.0-py3-none-any.whl
- Upload date:
- Size: 21.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fcc4b817d9a0ffd9859ec381d3f4ee32e02382f42a8509f9d36992179197ede
|
|
| MD5 |
a3ba9ead49b04e1d444f48e3cee474d7
|
|
| BLAKE2b-256 |
188586b4f9dccde3a18dfe4111e13ba7742c419057792ef7f9d0b020f2194cec
|
Provenance
The following attestation bundles were made for trustsight-0.11.0-py3-none-any.whl:
Publisher:
publishing.yml on emiliano-go/trustsight
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trustsight-0.11.0-py3-none-any.whl -
Subject digest:
9fcc4b817d9a0ffd9859ec381d3f4ee32e02382f42a8509f9d36992179197ede - Sigstore transparency entry: 2291582730
- Sigstore integration time:
-
Permalink:
emiliano-go/trustsight@36ecc9d2d08e601319dd9473bccc6f3d65cebd8b -
Branch / Tag:
refs/tags/v0.11.0 - Owner: https://github.com/emiliano-go
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publishing.yml@36ecc9d2d08e601319dd9473bccc6f3d65cebd8b -
Trigger Event:
release
-
Statement type: