least-privilege
/least-privilege
Zawęża każde poświadczenie do minimum używanych działań, z tożsamościami per workload i wygasaniem, by wyciek miał mały zasięg.
- Autor
- Amey-Thakur ↗
- Repozytorium
- AI-SKILLS ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 05.09.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 05.09.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Zawęża każde poświadczenie do minimum używanych działań, z tożsamościami per workload i wygasaniem, by wyciek miał mały zasięg.
Oryginalny opis (EN)
Scope every credential to the minimum actions it uses, with per-workload identities and expiry so a leak has a small blast radius. Use when writing an IAM policy, provisioning a service account, or reviewing an access grant.
Jak działa
- Method
- Litmus tests
- Boundaries
Podgląd SKILL.md
--- name: least-privilege description: Scope every credential to the minimum actions it uses, with per-workload identities and expiry so a leak has a small blast radius. Use when writing an IAM policy, provisioning a service account, or reviewing an access grant. --- # Least privilege A credential tends to accumulate permissions and never shed them: someone grants broad access to unblock a deploy, and it stays broad for years. When that credential leaks, the blast radius is everything it could ever do, not what it needed. Least privilege means each identity gets exactly the actions it uses, and access expires unless renewed. ## Method 1. **Start from deny and add named actions.** Write IAM policies that grant specific actions on specific resources, such as `s3:GetObject` on one bucket ARN, never `s3:*` or `Resource: "*"`. A wildcard is a grant you cannot audit. 2. **Give each workload its own identity.** One service account per service, not a shared admin key. When a service is compromised or retired, you disable one account with a known, narrow scope instead of guessing what a shared key touched. 3. **Diff every IAM change before it merges.** Run the policy through AWS Access Analyzer or an equivalent, and read the diff for a broadened action or resource. Access Analyzer flags a grant that opens a resource to an external principal. 4. **Right-size from real usage.** Pull the last 90 days from CloudTrail or GCP Policy Analyzer and drop actions the identity never called. AWS surfaces this as last-accessed data; remove permissions unused past your window. 5. **Set expiry on credentials and grants.** Prefer short-lived tokens (STS AssumeRole, workload identity federation) over long-lived keys. For standing access, attach a review date and revoke on it so temporary elevation self-expires rather than lingering. 6. **Separate human and machine paths.** Humans authenticate through SSO with MFA and assume roles; machines use workload identity. Never hand a person a service account's static key, because it bypasses the controls the human path enforces. ## Litmus tests - Does any production policy contain `*` in Action or Resource without a written justification? - Can you name, per credential, the smallest role that still passes the test suite? - Would Access Analyzer report zero unintended external or cross-account grants? - Does every long-lived key have either an expiry or a scheduled review date? ## Boundaries This scopes what an identity may do, not where its secret is stored or rotated (see secrets-management) or how a user first proves identity. Cloud IAM models differ; translate the principle to your provider's grammar rather than copying ARNs. Some break-glass access must stay broad: gate it behind approval and logging instead of narrowing it away.
Wersje
W bazie nie ma innych skilli o nazwie least-privilege.
Migawka bazy z 13.11.2026 · wersja paczki 11b76a050dc7 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Podobne skille
- 100gcp-iam-service-accounts-workload-identity
Zabezpiecza obciążenia w Google Cloud przez IAM z minimalnymi uprawnieniami i Workload Identity Federation w GKE. - 100mcp-security-least-privilege-scoping
Zawęża dostęp serwerów MCP do katalogów, poświadczeń baz danych i tokenów chmurowych do minimum niezbędnego do pracy. - 100iam-least-privilege-review
Sprawdza polityki IAM w AWS pod kątem zbyt szerokich uprawnień i proponuje zawężoną politykę z walidacją w IAM Access Analyzer. - 100aws-iam-review
Przegląda IAM AWS pod kątem nadmiernych uprawnień i ścieżek eskalacji, z Access Analyzer i raportami poświadczeń. - 100iam
Tworzy i zmienia uprawnienia IAM w Google Cloud według zasady najmniejszych uprawnień: role, warunki, konta usługowe, Workload Identity Federation i gcloud, bez ról owner i editor. - 90service-account-review
Zestawia i zabezpiecza konta nie-ludzkie, takie jak konta serwisowe, tokeny i poświadczenia CI, sprawdzając właściciela, uprawnienia i wiek poświadczeń.