Least privilege and mediation

From RedHatProductSecurity/prodsec-skills · View interactive version

Least privilege and mediation is an AI agent skill from the GitHub repository RedHatProductSecurity/prodsec-skills. Enforce least privilege and complete mediation in access control design. Use when reviewing authorization models, RBAC configurations, API access controls, or evaluating whether every request is authorized before access is granted.

How to use this skill

Skill file

Least Privilege and Complete Mediation

These two principles work together: least privilege limits what an entity can do, and complete mediation ensures that every access attempt is checked against those limits.

Least Privilege

Principle: Individuals and entities should only be given sufficient access and permissions to complete their assigned duties, no more.

Key Aspects

Application

| Context | Least-Privilege Practice |

|---|---|

| Database | Application accounts use the lowest privilege level; separate accounts per trust level |

| Kubernetes | No wildcards in RBAC; no cluster-admin; explicit verbs and resources |

| Cloud IAM | Individual accounts; IAM groups; no root credentials for daily operations |

| OS/containers | Non-root users; readOnlyRootFilesystem; no-new-privileges |

| API access | Scoped tokens; short-lived credentials; per-operation authorization |

Complete Mediation

Principle: Every request by a subject to access an object must undergo a valid and effective authorization process that the subject cannot bypass or disable.

This is a pillar of Zero Trust Architecture: never assume a request is authorized because it came from inside the network or from a previously authenticated session.

Key Aspects

Application

Implementation Checklist

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.