security-api-harden
Skill6 starsChanged 3 months agoMITView on GitHub
Secure or review API ingress, transport, identity and response failure boundaries, plus resource, tenant and workspace authorization. Use when input, external calls or responses cross a trust boundary, or a caller selects stored resources. RU: безопасность API, авторизация ресурсов.
In this repository65 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/agent-hook-verify/references/claude.mdCLAUDE.md
- agent-command-runSkill
- agent-context-auditSkill
- agent-hook-verifySkill
- agent-integration-auditSkill
- agent-model-findSkill
- agent-project-syncSkill
- agent-skill-findSkill
- agent-skill-syncSkill
- agent-terms-defineSkill
- agent-workspace-migrateSkill
- api-contract-defineSkill
- api-docs-syncSkill
- api-stream-diagnoseSkill
- api-yandex-oauth-runSkill
- code-async-reviewSkill
- code-cli-buildSkill
- code-config-auditSkill
- code-durable-reviewSkill
- code-performance-fixSkill
- code-state-verifySkill
- deploy-artifact-publishSkill
- deploy-rollout-runSkill
- design-brand-buildSkill
- docs-claims-verifySkill
- docs-diagram-buildSkill
- docs-prose-fixSkill
- git-branch-cleanSkill
- git-merge-syncSkill
- git-path-runSkill
- git-repo-runSkill
- git-worktree-guardSkill
- infra-container-setupSkill
- infra-network-diagnoseSkill
- infra-project-migrateSkill
- infra-runbook-buildSkill
- kanban-board-auditSkill
- kanban-card-buildSkill
- kanban-card-planSkill
- kanban-card-reviewSkill
- kanban-card-runSkill
- kanban-card-verifySkill
- kanban-epic-coordinateSkill
- kanban-queue-coordinateSkill
- kanban-roadmap-planSkill
- kanban-schedule-runSkill
- monitor-telemetry-setupSkill
- personal-action-planSkill
- quality-artifact-verifySkill
- quality-change-reviewSkill
- quality-change-verifySkill
- research-prior-art-findSkill
- research-source-auditSkill
- research-source-findSkill
- research-spike-runSkill
- security-access-diagnoseSkill
- security-boundary-hardenSkill
- security-boundary-reviewSkill
- security-filesystem-hardenSkill
- The first 60 shown.
The file
Files
API security boundaries and resource authorization
Use when API input, external calls, generic protocol methods or responses cross a trust boundary, or when a caller selects durable or live resources, a project/workspace, tenant, session, account or credential-bearing connection. Trace real authentication, resource scope, validation, planning, transport, parsing, output and state effects. Separate a read-only review from an authorized implementation; neither implies live provider calls or deployment.
Boundaries
Validate at each relevant boundary before the associated side effect. Treat injected transport results and their inspection as untrusted where the contract requires it. Preserve stable, bounded and non-sensitive failure behavior; an error helper can leak a body before a later sanitizer runs. Select ingress and raw APIs, transport and response validation or generated and identity acceptance for the active mode. Test actual consumer seams, observe forbidden downstream calls with valid positive controls, and report missing coverage and live-runtime evidence separately.
Resource authorization and isolation
Authentication establishes caller identity; a supplied identifier or path is a selector, not proof of authority. Trace each operation from the request or transport to trusted server-owned context, durable ownership, query or mutation, worker and response, including list and detail, resume, search, counts, aggregates, exports, imports, live actions, cleanup and equivalent endpoints. Resolve and verify the caller's grant and resource scope before sensitive reads, credential access, effects or mutations. Scope queries and captures at their source: filtering a global inventory afterwards has already accessed foreign data. Fail closed when trusted context or ownership is unavailable.
Match identity comparison and canonicalization to the actual contract. Preserve durable ownership on an existing resource; never silently reassign missing ownership or trust a request-supplied workspace. Keep scope attached through internal projections, caching, multi-profile aggregation and fallback paths. Unknown or foreign resources use the documented non-disclosing denial without hiding required operational errors. Exercise the real authorization seam with an authorized positive control and foreign, missing and spoofed negative cases, and verify forbidden history reads, credentials and effects do not occur. Preserve the project's authorization and compatibility policy.
References: scope and isolation checks for implementation and regression tests, credential and capability checks for selectors, idempotent replay and one-time download capabilities, acceptance evidence for an independent read-only review, and browser session boundaries for browser-owned sessions and request-context bridges.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

