android-permissions-security
하는 일
이 스킬은 Android 권한과 다른 앱이 접근할 수 있는 구성 요소의 보안을 점검합니다. 런타임 권한 요청도 다룹니다. 최소 권한 원칙을 적용하려는 Android 개발자를 위한 스킬입니다.
사용하는 경우
- ✓AndroidManifest의 권한을 검토하고 앱에 필요 없는 권한을 제거하고 싶을 때.
- ✓앱의 외부 노출 구성 요소를 보호하기 위해 커스텀 권한을 정의하고 싶을 때.
- ✓서비스나 프로바이더에서 호출하는 앱의 신원을 확인해야 할 때.
스킬 링크
https://github.com/android/skills/blob/main/security/android-permissions-security/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“내 AndroidManifest의 권한을 검토하고, 다른 앱이 호출할 수 있는 서비스와 리시버를 보호해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 매니페스트에서 위험한 권한 설정과 외부 노출 구성 요소를 확인합니다. 그다음 커스텀 권한, 호출 앱의 서명 확인, 올바른 런타임 권한 흐름 같은 수정안을 권합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Guidelines for auditing permission vulnerabilities, enforcing least privilege, securing IPC boundaries, and handling runtime permissions across the Android ecosystem.
Glossary
- Runtime Permission: Dangerous permission (e.g., Camera, Location) that must be granted by the user at runtime on Android 6.0+ (API 23+).
- Custom Permission: A permission defined by an app (
<permission>) to restrict access to its exported components. - Protection Level: Attribute defining how the OS grants the permission (
normal,dangerous,signature,knownSigner). - knownSigner: Protection flag (API 31+) granting signature-level access to partner apps matching trusted certificate digests.
- SigningInfo: Object (API 28+) providing signing history and multiple signer certificates for an application.
- Binder Calling Identity: Reliable UID representing the calling process obtained using
Binder.getCallingUid(). - URI Permission: Temporary, granular access granted to a content URI using
grantUriPermissionsand intent flags.
Prerequisites
- Add
androidx.core:core-ktxandandroidx.activity:activity-ktx(orandroidx.fragment:fragment-ktx) dependencies to the app-levelbuild.gradlefile forContextCompatandActivityResultContracts. - For
knownSignerpartner permissions (android:knownCerts), ensure the projectcompileSdkandtargetSdkare at least 31 (Android 12). - For broadcast identity sharing (
BroadcastOptions.setShareIdentityEnabled), ensurecompileSdkandtargetSdkare at least 34 (Android 14).
1. Security audit and permission gap detection playbook
When auditing an Android project for permission and IPC security vulnerabilities, systematically inspect each area:
| Vulnerability Area | Search In / Pattern | Risk | Remediation Action |
|---|---|---|---|
| Weak Custom Permission Protection | AndroidManifest.xml with android:protectionLevel="normal", "dangerous", or "signatureOrSystem" |
Unauthorized apps request or claim permission without restriction | Upgrade to signature or signature with knownSigner and android:knownCerts. |
| Overly Broad URI Permission Grants | <grant-uri-permission android:pathPrefix="/" /> or pathPrefix="" in <provider> |
Leaks all provider data to third parties | Replace with explicit scoped subpath (e.g. android:pathPrefix="/shared/"). Retain android:grantUriPermissions="true". Remove any wildcard pathPrefix="/". |
| Missing ContentProvider Split Permissions | <provider> with only generic android:permission or missing android:readPermission and android:writePermission |
Read-only callers execute write operations or write-only callers access read operations | Configure granular android:readPermission="...READ_DATA" and android:writePermission="...WRITE_DATA", AND declare the custom <permission> tags with android:protectionLevel="signature" (or signature with knownSigner) at the <manifest> root. |
| Spoofable Caller Identity Checks | intent.getStringExtra("calling_package"), intent.getStringExtra("sender"), callingPackage == "..." in Services |
Malicious callers forge intent extras or strings | Remove string checks; authenticate caller UID cryptographically using Binder.getCallingUid() and pm.hasSigningCertificate(). |
| Bound Service Permission Bypass | checkCallingOrSelfPermission() or enforceCallingOrSelfPermission() in Binder AIDL stubs |
Falls back to host app UID outside IPC or when identity is cleared, causing Confused Deputy bypass | Replace with enforceCallingPermission("...WRITE_DATA", ...) or checkCallingPermission("...WRITE_DATA"). |
| Missing Method-Level Checks in Bound Services | Bound Service AIDL methods mutating state without enforcing write permissions | Callers with read-only binding access invoke mutating write operations | Add enforceCallingPermission("...WRITE_DATA", "Caller lacks WRITE_DATA permission") inside mutating AIDL methods. |
| Flawed Runtime Permission Flow | Missing shouldShowRequestPermissionRationale(), missing permanent denial handling, or re-requesting in loops |
Poor user experience, infinite loops, or inability to recover permissions | Implement 3-state flow: check grant -> check rationale dialog -> launch contract. On permanent denial, redirect to Settings.ACTION_APPLICATION_DETAILS_SETTINGS. |
| Simultaneous Location Requests | `arrayOf(ACCESS_FINE_LOCATION, ACCESS_BACKGROUN |
자주 묻는 질문
서명 권한은 무엇인가요?
같은 개발자 키로 서명된 앱에만 부여되는 권한이며, 스킬은 이를 사용해 접근을 제한할 수 있습니다.
런타임 권한 팝업도 처리하나요?
네. Android 6.0 이상에서 위험한 권한에 대한 런타임 권한 흐름을 다룹니다.
추가 라이브러리가 필요한가요?
네. 스킬이 추가하는 코드에 일부 AndroidX 라이브러리가 필요하다고 알려 줍니다.
상세 정보
작성자의 원본 설명
Audits, detects gaps, and remediates Android permissions and IPC component security vulnerabilities. Use when reviewing AndroidManifest.xml, defining custom permissions, securing Services, Receivers, and Providers, verifying caller signatures and UID using Binder, or implementing runtime permission flows.
repo: android/skills
인기도
- GitHub 스타
- 10k
- 순위
- #11933
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 10. 29.
댓글
- …
이 저장소의 다른 스킬
agp-9-upgrade
10k에이전트가 Android 앱을 Android Gradle Plugin 9로 업그레이드하고 호환되지 않는 변경 사항을 처리하도록 돕습니다. 멀티플랫폼 프로젝트는 대상이 아닙니다.
camerax
10k에이전트가 CameraX로 동영상 녹화, 하드웨어 제어, ML Kit와 Media3 효과를 포함한 Android 카메라 기능을 만들도록 돕습니다.
android-for-cars-parked-apps
10k에이전트가 Android 동영상, 게임 또는 브라우저 앱을 Android Auto와 Android Automotive의 주차 중 앱으로 실행되도록 맞추는 것을 돕습니다.
appfunctions
10k에이전트가 Android 앱의 핵심 작업 흐름을 찾아, AI 에이전트와 음성 명령이 실행할 수 있는 AppFunctions로 노출하도록 돕습니다.