How abisheikm1/tribunal works
Purpose and Entry Points
Tribunal is an authorized Android APK pentest pipeline. An APK placed under apk/ is the sole scope boundary; analysis state is isolated by APK SHA-256 under targets/<hash>/. The practical entry points are the runbook at skills/pentest-runbook/SKILL.md, static inventory script skills/decompile-threat-review/scripts/inventory.py, and shared enforcement/runtime helpers in scripts/harness.py and scripts/scope_gate.py.
1. Scope, Identity, and Per-APK State
The pipeline resolves and rejects APK paths outside apk/, computes a content hash, and creates the target workspace. This boundary prevents later stages from accepting arbitrary APK paths. Structured artifacts—inventory, threat model, findings, status, evidence, Frida assets—cross stages through targets/<apk-sha256>/, while decompiler output remains available for manual source pivots.
Paths: scripts/harness.py, scripts/scope_gate.py, apk/README.md.
2. Static Decompilation and Inventory
Static review starts by invoking APKTool and JADX, generating manifest/resource and Java-like source trees under the target workspace. Inventory produces the baseline used by agent review and specialist analyses. Vendored tool distributions avoid a separate JADX/APKTool installation, though Java is required.
Paths: skills/decompile-threat-review/scripts/inventory.py, tools/apktool/apktool.jar, tools/jadx/bin/jadx.
3. Threat Modeling and Adversarial Static Review
The decompile-threat-review skill is the primary static-analysis control plane. It uses the vulnerability catalog/rubric to build threat_model.json, identify candidate findings in report.json, map chains, and measure review coverage. The default stage-1 workflow fans out structural and disjoint rubric reviews, then applies skeptical review before candidates advance.
Paths: skills/decompile-threat-review/SKILL.md, .claude/workflows/android-adversarial-review.js, docs/vuln-catalog.md.
4. Specialized Static Audit Skills
Focused skill modules inspect common Android risk surfaces: exported components, deep links, implicit intents, WebViews, local authentication, dynamic code execution, native libraries, dependencies, and API surface. They consume the decompiled target data and support the broader static-review evidence rather than forming separate final-report pipelines.
Paths: skills/exported-components/scripts/detect_exported.py, skills/webview-audit/scripts/scan_webview.py, skills/native-audit/scripts/triage_native.py.
5. Dynamic Verification Boundary
Human-operated emulator, ADB, Burp Suite, and Frida form the dynamic boundary. Preflight checks readiness; the verifier scaffolds evidence and updates finding status after observed validation. Frida pinning bypasses are templates or targeted, source-informed hooks, stored per target. Missing optional tools degrade gracefully rather than being bundled.
Paths: scripts/preflight_check.py, skills/dynamic-verify/scripts/verify_runner.py, skills/dynamic-verify/scripts/frida/bypass_template.js.
6. API Discovery and Server-Side Testing
After traffic capture through Burp, API testing imports Burp XML history, extracts endpoint evidence into api_findings.json, and directs assessment of authorization, injection, and business-logic risks. This is a separate server-side testing stage but shares target identity and evidence with static/dynamic stages.
Paths: skills/api-vuln-test/scripts/extract_endpoints.py, skills/api-vuln-test/SKILL.md, targets/.
7. Courtroom Decision and Report Publication
Only findings marked confirmed enter an agent-driven prosecution/defense/judge workflow. Verdict records prevent retrial; guilty findings become Markdown reports organized by application package. Thus report/ is an output boundary, not a raw scan dump.
Paths: skills/courtroom-verdict/SKILL.md, .claude/workflows/android-courtroom-verdict.js, report/README.md.
Runtime and Legacy Boundary
Deterministic scripts require Python 3.10+ and standard library; Java runs vendored decompilers. Dynamic work additionally depends on Android Studio emulator, ADB, Frida/frida-server, Objection, and Burp. legacy-harness/ is superseded by the skill-based pipeline and should not define new architecture.
Paths: legacy-harness/README.md, docs/DESIGN.md, CLAUDE.md.
Main entry points: harness.py Target workspace · apktool.jar Vendored decompilers · SKILL.md Threat review · verify_runner.py Dynamic verifier
Components 18
Scope & State
- Scoped APK input · Only APKs under apk/ are accepted.
apk/README.md - Scope gate · Resolves APK paths and rejects out-of-scope inputs.
scripts/scope_gate.py - Target workspace · Hashes APK content and manages isolated per-target state.
scripts/harness.py - Per-APK artifacts · State and evidence live under targets/<apk-sha256>/.
Static Analysis
- Vendored decompilers · APKTool and JADX produce resources, manifest, and source pivots.
tools/apktool/apktool.jar - JADX launcher
tools/jadx/bin/jadx - Static inventory · Builds the baseline inventory from decompiled target data.
skills/decompile-threat-review/scripts/inventory.py - Threat review · Builds threat model, candidates, chains, and coverage.
skills/decompile-threat-review/SKILL.md - Adversarial review · Fans out rubric review and applies skeptical candidate review.
.claude/workflows/android-adversarial-review.js - Vulnerability rubric
docs/vuln-catalog.md - Specialist audits · Inspects Android-specific risk surfaces to support static evidence.
skills/exported-components/scripts/detect_exported.py
Dynamic & API Verification
- Dynamic preflight · Checks human-operated dynamic tooling readiness.
scripts/preflight_check.py - Dynamic verifier · Scaffolds evidence and updates finding status after validation.
skills/dynamic-verify/scripts/verify_runner.py - Frida hooks · Templates and targeted source-informed hooks.
skills/dynamic-verify/scripts/frida/bypass_template.js - API evidence testing · Imports Burp history and extracts endpoint findings for API assessment.
skills/api-vuln-test/scripts/extract_endpoints.py
Decision & Publication
- Courtroom verdict · Only confirmed findings undergo prosecution, defense, and judgment.
skills/courtroom-verdict/SKILL.md - Verdict workflow · Verdict records prevent retrial.
.claude/workflows/android-courtroom-verdict.js - Published reports · Guilty findings become package-organized Markdown reports.
report/README.md
Connections 23
- Scoped APK input → Scope gate: submit
- Scope gate → Target workspace: approved APK
- Target workspace → Per-APK artifacts: hashes and initializes
- Target workspace → Vendored decompilers: decompile target
- Vendored decompilers → JADX launcher: source output
- JADX launcher → Per-APK artifacts: decompiled source
- Vendored decompilers → Per-APK artifacts: manifest and resources
- Per-APK artifacts → Static inventory: decompiled data
- Static inventory → Threat review: baseline inventory
- Vulnerability rubric → Threat review: rubric
- Threat review → Adversarial review: candidate review
- Adversarial review → Per-APK artifacts: threat model and findings
- Per-APK artifacts → Specialist audits: static evidence
- Specialist audits → Per-APK artifacts: supporting evidence
- Per-APK artifacts → Dynamic preflight: target context
- Dynamic preflight → Dynamic verifier: ready environment
- Frida hooks → Dynamic verifier: hooks
- Dynamic verifier → Per-APK artifacts: validation evidence and status
- Per-APK artifacts → API evidence testing: identity and evidence
- API evidence testing → Per-APK artifacts: endpoint findings
- Per-APK artifacts → Courtroom verdict: confirmed findings
- Courtroom verdict → Verdict workflow: case decision
- Verdict workflow → Published reports: guilty findings