agentleFS
MKS-01MKS-01/appscreenmap/.claude/skills/security-rules/SKILL.md

security-rules

Skill2 starsChanged 17 days agoMITView on GitHub

The security audit's rule catalogue for Android and iOS apps — each rule's id, severity, evidence (manifest, static scan, dynamic run, data left on the device), how to detect it, the fix, and its official Android / Apple / Google Play source. Use when interpreting a security finding, writing fix guidance, deciding if something is a real problem, adding or changing a rule, or when the Insights Security audit shows "not set up" and you need to know what it will check.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are 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.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never write exploit steps in a finding: say what is exposed and how to fix it.

    line 40
  2. Very specific:

    Add the row to reference/rules.md (id in backticks.

    line 45
  3. Very specific:

    When a scanner implements a rule, set "status": "ready" and add a fixture test beside the scanner.

    line 48
  4. Very specific:

    Run the audit with the security-audit skill.

    line 50

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Security rules

One catalogue, three readers:

FileReader
packages/security/src/appscreenmap/security/rules.jsonthe source of truth: id, title, platform, category, severity, tools needed, why, fix, official refs, status
packages/security/src/appscreenmap/security/rules.pyloads and validates it (severity, platform, category, https + official host only, unique ids)
apps/viewer/src/insights/registry.tsthe viewer shows every planned rule as a placeholder on the Security audit ("not set up")
reference/rules.mdthe human version with how to detect each rule by hand; a test fails if a rule is missing from it

What a rule is

{ "id": "debuggable", "title": "Debuggable build", "platform": "android", "category": "manifest",
  "severity": "error", "needs": ["aapt2"], "status": "planned",
  "why": "…one or two sentences on what an attacker gets…", "fix": "…the change to make…",
  "refs": [{ "title": "android:debuggable", "url": "https://developer.android.com/…", "publisher": "Android Developers" }] }
  • platform: android, ios or both. category: manifest, static, dynamic, data (the four kinds of evidence).
  • status: planned until appscreenmap security (packages/security/) implements it, then ready. The viewer treats planned as "not set up".
  • severity: error fix before release; warning fix or justify in writing; info a decision to make on purpose.
  • refs: official pages only (developer.android.com, developer.apple.com, support.google.com, source.android.com, w3.org). No blogs, no OWASP copies. Android has a page per vulnerability class under developer.android.com/privacy-and-security/risks/; use the one that matches the rule. Open the page and read it: a link that merely sounds related is worse than none. Apple's documentation pages render client-side, so check them in a browser.

Reading a finding

  1. Say which evidence it came from. A manifest flag is a fact about the build; a static match is a candidate (read the code before calling it a bug); a dynamic observation is one session.
  2. Severity is about the app as shipped, not the crawl. debuggable on a debug build isn't a finding; on the release build it is.
  3. A secret is real only if it grants something. Rotate first, then decide if it was ever exposed.
  4. Never write exploit steps in a finding: say what is exposed and how to fix it.

Adding or changing a rule

  1. Edit rules.json. Read the official page you cite; copy its exact title.
  2. Add the row to reference/rules.md (id in backticks; the test checks this) with how to detect it by hand.
  3. uv run pytest packages/security/tests/test_security_rules.py (validates fields, hosts, ids, and the docs sync), then cd apps/viewer && bun run build.
  4. When a scanner implements a rule, set "status": "ready" and add a fixture test beside the scanner.

Run the audit with the security-audit skill. Platform deadlines and yearly Android/iOS changes are the Platform changes audit (apps/viewer/src/insights/sources.ts), not this one.

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.