App Security Auditor
When to use
Phase 5, after a successful build and before appfactory action=report or any store upload.
Inputs
os/<target>, artifact path.
Procedure
- Run
appfactory action=audit target=<id>first: it appliesnavin/skills/app-factory/policies/security.yaml(remote URL wrapper, cleartext, forbidden or reason-needed Android permissions, Tauri capabilities and CSP, HTTPS backend, secret files and secret patterns inos/<id>). Everyerrorblocks the delivery; everywarningneeds a feature that justifies it, written in the report. The checks below go deeper by hand. - Android permissions: read
os/android/android/app/src/main/AndroidManifest.xml; everyuses-permissionmust map to a used plugin. FlagREAD_EXTERNAL_STORAGE,MANAGE_EXTERNAL_STORAGE,SYSTEM_ALERT_WINDOW,REQUEST_INSTALL_PACKAGESwithout need. Checkandroid:usesCleartextTrafficis absent orfalseandandroid:debuggableis not set in release. - Tauri:
src-tauri/capabilities/*.jsonminimal (no wildcard fs scope, no unscopedshell:allow-execute);app.security.cspset withoutunsafe-eval;devtoolsoff in release. - Secrets scan:
grepfor keys/tokens inos/<target>and the built web dist (sk_live,AKIA,-----BEGIN,api_key=); keystore,.jks,.p12,.keymust not be tracked (git action=status,.gitignore). Usesecrets-scannerwhen available. - Dependency audit:
npm audit --omit=dev(pnpm audit,yarn npm audit,bun audit),cargo install cargo-audit --lockedthencargo auditinsrc-tauri. - Signing keys: only from env or a secret store (
TAURI_SIGNING_PRIVATE_KEY,ANDROID_KEYSTORE_PASSWORD), never printed in logs. - TLS: every API base URL
https://; nohttp://in the dist (grep -r "http://" <dist>excludinglocalhostand XML namespaces).
Verification
Each check recorded as a report test (passed / failed / not_run with evidence).
Failure modes and fixes
- High/critical vulnerabilities: upgrade in
os/<target>only; site dependencies are reported, not changed. - Secret in the dist: move it to the backend; a frontend secret is public.
Deliverable
Security findings list; blocking findings prevent the delivered status.
