SECURITY · STATIC ANALYSIS

TrustSight

Evidence-driven security analysis for AUR packages. Never executes code. Fail-closed by design.

Python 3.11+ Arch Linux SQLite OpenAI / Ollama
PKGBUILD / diff → Static analysis → Evidence + coverage → Risk assessment → Verdict

Problem

AUR package updates are reviewed by humans reading PKGBUILD diffs. This process is slow, inconsistent, and misses structural attacks: piped shell scripts, checksum disabling, typosquatting, obfuscated commands, and maintainer takeovers. There is no automated tool that produces evidence without executing the package.

Why it's hard

The hard constraint is never executing code. Static analysis of PKGBUILDs means reasoning about shell scripts, command injection, typosquatting, and maintainer behavior patterns without running anything. Corpus-wide cluster detection adds another layer: tracking ~180K source URLs and ~36K maintainer identities to detect first-seen signals, orphan hijacking, and accelerated release cadence. The tool must fail-closed; incomplete evidence must not silently become confidence.

Security model

Invariants
PKGBUILD executionBLOCKED
Arbitrary networkBLOCKED
System modificationBLOCKED
Coverage lossEXPLICIT
Incomplete analysisFAIL-CLOSED

Detection categories

Command injection

Piped shell scripts, obfuscated commands, build-environment tampering (LD_PRELOAD, etc.)

Supply chain

Checksum disabled, source URL swaps, unpinned build deps, GPG verification removed

Typosquatting

Package-name and source-URL edit-distance against known forge domains and popular packages

Maintainer signals

Untrusted takeover, orphan hijacking, stale package revived, accelerated release cadence

Novelty detection

First-seen URLs and maintainers against signed seed database (~180K source URLs, ~36K maintainer identities)

Sabotage payloads

Fork bombs, disk wiping, permission sabotage, coin miners; distinguishes build sandbox from system context

Encoding attacks

Unicode bidi overrides, homoglyph codepoints, reviewer-directed instruction templates

IOC matching

Known-bad indicators against signed, federated baselines from the release channel

Key decisions

Static analysis only

Never executes PKGBUILDs, never fetches URLs, runs before makepkg. The tool is a SAST tool by design.

Evidence, not proof

Every finding is traceable to a specific diff line, URL, or novelty record. The output is a structured evidence report, not a gate.

Signed baselines

Novelty seed and IOC baselines ship as signed GitHub release assets. Verified against pinned distribution key on import.

Configurable dependency depth

AUR dependencies are analyzed as packages in their own right, to a configurable depth. Coverage gaps are explicit.

Verification

TrustSight includes an adversarial measurement harness that turns "an LLM found N bypasses" into a reproducible, auditable, cost-tracked measurement against a pinned build.

Harness statuses
detectedrule fired
partial_evasionanother rule caught it
fail_closed_catchcoverage gap blocked UNFLAGGED
bypassTrustSight returned UNFLAGGED
behavior_lostattack chain not proven

What it cannot see

  • ·Malicious upstream release tarballs (audits PKGBUILD, not binaries)
  • ·Deliberately unremarkable attacks (no diff signal = invisible)
  • ·Runtime attacks (tool never executes anything)
  • ·Zero-day structural attacks (pattern-based, calibrated against corpus)

Results

Test count
1,943
Test lines
28,000
Detection rules
~200
Source URLs
180K