Token导航 LogoToken导航TokenDH.com
开发规范需要联网github未标认证来源可访问许可证需确认审计通过

android-security-best-practicesAndroid 安全最佳实践

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

430

周安装

12

GitHub Stars

5

下载量

97
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:android-security-best-practices(Android 安全最佳实践)
来源仓库:https://github.com/krutikjain/android-agent-skills
仓库路径:skills/android-security-best-practices
安装命令:
npx skills add https://github.com/krutikjain/android-agent-skills --skill android-security-best-practices
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/krutikjain/android-agent-skills --skill android-security-best-practices

简介

该技能用于 Android 应用的安全审计,覆盖凭据管理、组件导出和网络信任检查。

  • 适用于识别敏感数据存储、API 鉴权漏洞和依赖库风险场景。
  • 提供最小权限原则实施建议和 WebView 加固方案参考。
  • 工具输出不能作为最终结论,涉及生产数据时应严格脱敏处理。
  • android-security-best-practices 属于开发规范类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Android Security Best Practices

When To Use

  • Use this skill when the request is about: android security review, secret handling android app, exported component security android.
  • Primary outcome: Apply Android app security guidance around secrets, storage, network trust, exported components, and least privilege.
  • Read references/patterns.md when you need the attack-surface checklist or the storage/network/component decision matrix.
  • Read references/scenarios.md for manifest, backup, WebView, and release-hardening review paths.
  • Handoff skills when the scope expands:
  • android-modernization-upgrade
  • android-ci-cd-release-playstore

Workflow

  1. Inventory the attack surface first: exported components, intent/deep link entry points, file sharing, WebView usage, local storage, logs, backups, and network trust config.
  2. Remove avoidable risk before hardening details: prefer platform pickers and choosers, internal storage, server-issued short-lived tokens, and least-privilege permissions instead of shipping broad access or long-lived secrets.
  3. Lock the remaining boundaries explicitly with android:exported, component permissions, FileProvider, networkSecurityConfig, debug-only trust anchors, and immutable PendingIntents.
  4. Review sensitive surfaces that often regress in Android apps: WebView JavaScript bridges, backup/data extraction rules, cleartext exceptions, log redaction, and same-developer IPC assumptions.
  5. Validate the release posture with reproducible checks, then document residual risks and whether backend enforcement or Play Integrity is advisory or blocking.

Guardrails

  • Treat client-side secrets as recoverable by attackers; move trust decisions and privileged API access server-side whenever possible.
  • Export components only when there is a real external caller, and permission-protect or signature-protect them when the contract is private.
  • Use network security config to scope debug trust anchors or cleartext exceptions instead of broad manifest toggles.
  • Redact logs, review backups, and keep sensitive data out of shared external storage by default.

Anti-Patterns

  • Hiding API keys in resources, the NDK, or obfuscation and calling that secure.
  • Leaving android:exported or intent filters ambiguous on launchable or IPC components.
  • Sharing files through raw file paths or overly broad storage permissions instead of FileProvider and system surfaces.
  • Pinning certificates without an operational rotation story or fallback plan.

Review Focus

  • Exported activities, services, receivers, and providers with clear ownership and caller expectations.
  • Secrets, tokens, and backend trust assumptions.
  • Network trust, debug overrides, cleartext usage, and certificate handling.
  • File sharing, backups, logs, and user-data leakage paths.
  • Abuse signals such as Play Integrity only as layered defense, never as the sole authorization model.

Examples

Happy path

  • Scenario: Audit manifests and sharing surfaces for explicit exports, permissions, and FileProvider usage.
  • Command: rg -n "android:exported|android:permission|FileProvider|grantUriPermissions" examples

Edge case

  • Scenario: Catch insecure backup or network defaults before a release candidate goes out.
  • Command: rg -n "networkSecurityConfig|usesCleartextTraffic|allowBackup|fullBackupContent|dataExtractionRules" examples

Failure recovery

  • Scenario: Separate app hardening from modernization or release-pipeline requests.
  • Command: python3 scripts/eval_triggers.py --skill android-security-best-practices

Done Checklist

  • Every externally reachable component has explicit exposure and caller constraints.
  • Secrets, tokens, and trust decisions are not relying on obscurity in the client app.
  • Network, backup, logging, and sharing behavior have explicit release-safe defaults.
  • Residual risks and any backend dependencies are documented with clear follow-up work.

Official References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.29%
按下载量换算35

Claude

27.79%
按下载量换算27

Cursor

20.9%
按下载量换算20

Gemini CLI

10.26%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills