agentleFS
boy-offi9-incboy-offi9-inc/hexforge-gateway/skills/hexforge-apk-triage/SKILL.md

hexforge-apk-triage

Skill14 starsChanged 2 months agoMITView on GitHub

Full AI-assisted triage of an Android APK with HexForge - fingerprinting, manifest analysis, secret scanning, decompilation and a knowledge-graph-backed assessment with verifiable evidence. Use when asked to analyze, triage or assess an APK.

  • Reads credentials
  • Sends data out

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All task payloads below take apkPath as an absolute path on the Gateway host, e.g.

    line 34
  2. Distinctive:

    When this finishes, the graph already has packages, classes, inheritance edges, declared methods with call edges, URLs, strings and secret …

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

HexForge APK triage

Drive a running HexForge Gateway (default http://localhost:8080, auth via HEXFORGE_API_KEY if enabled) through its REST API. Every step produces a tracked artifact in the workspace, so the analysis is resumable and the graph links what it finds.

1. Create a workspace

curl -s -X POST http://localhost:8080/workspaces \
  -H "Content-Type: application/json" \
  -d '{"name": "acme-app-triage"}'

Note the id in the response; use it as $WS below.

2. Put the APK where the Gateway can read it

Agents read paths on the Gateway's host (or its shared filesystem). Copy the APK into the workspace directory - WORKSPACES_ROOT is where workspaces live (default alongside the Gateway checkout, see docs/SETUP.md):

cp app.apk "$WORKSPACES_ROOT/$WS/"

All task payloads below take apkPath as an absolute path on the Gateway host, e.g. WORKSPACES_ROOT/$WS/app.apk.

3. Triage first (fingerprint + manifest + native inventory)

curl -s -X POST http://localhost:8080/workspaces/$WS/tasks \
  -H "Content-Type: application/json" \
  -d '{"agent": "triage", "operation": "assess", "payload": {"apkPath": "<artifact path>"}}'

Tasks are fire-and-forget: poll GET /workspaces/$WS/tasks until status is completed. The assessment reports APKiD fingerprints (packer/compiler hints), manifest contents (package, SDKs, permissions, exported components), per-ABI native library inventory and Kotlin metadata name recovery - in assessment language, with a warnings list for anything that couldn't run.

4. Decompile (feeds the knowledge graph)

curl -s -X POST http://localhost:8080/workspaces/$WS/tasks \
  -d '{"agent": "jadx", "operation": "decompile", "payload": {"apkPath": "<artifact path>"}}'

When this finishes, the graph already has packages, classes, inheritance edges, declared methods with call edges, URLs, strings and secret candidates - no extra step needed.

5. Secret scan

curl -s -X POST http://localhost:8080/workspaces/$WS/tasks \
  -d '{"agent": "filesystem", "operation": "scan-secrets", "payload": {"targetPath": "<jadx output dir>"}}'

Candidates land in the graph as secret-candidate entities, redacted - never the secret value itself.

6. Native analysis (optional, for .so files)

Pick a native library from the triage inventory:

curl -s -X POST http://localhost:8080/workspaces/$WS/tasks \
  -d '{"agent": "ghidra", "operation": "analyze", "payload": {"filePath": "<path to .so>"}}'

JNI symbols (Java_com_acme_Foo_bar) get maps-to edges to the Java methods that declare them native.

7. Record findings with evidence

Findings must cite real artifacts. Evidence is validated on save - the cited file:line must exist in the workspace's artifacts:

curl -s -X POST http://localhost:8080/workspaces/$WS/findings \
  -d '{"claim": "App sends device ID to analytics endpoint", "status": "suspected", "confidence": 0.8, "evidence": [{"artifactId": "<id>", "file": "com/acme/Api.java", "line": 42}]}'

A finding can't be confirmed without validated evidence, and GET /findings/:id/verification re-checks every citation.

8. Query the graph

curl -s "http://localhost:8080/workspaces/$WS/graph/entities?type=secret-candidate"
curl -s "http://localhost:8080/workspaces/$WS/graph/entities?q=acme.com"

Report

GET /workspaces/$WS/report?format=sarif for a SARIF report, or read findings and their verification status directly.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.