Skill Being Reviewed
Skill name: api-security
Skill path: skills/appsec/api-security/
False Positive Analysis
Benign webhook receiver that can be over-reported if reviewers only see a public unauthenticated endpoint:
app.post("/webhooks/stripe", express.raw({ type: "application/json" }), async (req, res) => {
const signature = req.header("stripe-signature");
const event = stripe.webhooks.constructEvent(
req.body,
signature,
process.env.STRIPE_WEBHOOK_SECRET
);
await handleStripeEvent(event.id, event.type, event.data.object);
res.sendStatus(204);
});
Why this is a false positive risk:
Webhook endpoints are intentionally reachable without user authentication, so a review that only applies the normal API2/API5 authentication checklist can flag them as missing auth. The security decision depends on a different trust model: provider-specific signature verification over the raw request body, timestamp tolerance, replay/idempotency handling, source binding to the expected account/tenant, and event-type allowlisting. The current skill says to inventory downstream dependencies and unsafe consumption, but it does not give reviewers a dedicated way to distinguish an intentionally public signed webhook receiver from an unauthenticated endpoint that accepts forged business events.
Coverage Gaps
Missed variant 1: Webhook accepts forged events because no signature or timestamp is verified
app.post("/webhooks/payment", express.json(), async (req, res) => {
if (req.body.type === "payment.succeeded") {
await markInvoicePaid(req.body.data.invoiceId);
}
res.json({ received: true });
});
Why it should be caught:
This is API10 unsafe consumption of APIs and often API6 business-flow abuse. The API consumes a third-party event as if it were authoritative, but any caller can synthesize the event. The review checklist currently validates upstream response schemas, TLS, timeouts, redirects, and sanitization, but not inbound provider authenticity for webhook-style APIs.
Missed variant 2: Signature verification is present but broken by parsed-body verification
app.use(express.json());
app.post("/webhooks/stripe", (req, res) => {
const raw = JSON.stringify(req.body);
verifyWebhookSignature(raw, req.headers["stripe-signature"]);
processEvent(req.body);
});
Why it should be caught:
Many webhook providers sign the exact byte stream. Re-serializing parsed JSON can change whitespace, key ordering, encodings, or body bytes, causing teams to disable verification or build a verifier that does not match provider semantics. The skill should require reviewers to verify whether the raw body is preserved until signature verification completes.
Missed variant 3: Replay and duplicate delivery are not handled
Provider event id: evt_123
First delivery: invoice marked paid
Replay within 30 minutes: invoice credited again
Replay next day: still accepted because timestamp is ignored
Why it should be caught:
Valid signatures do not prove freshness or one-time processing. Webhook endpoints should enforce provider timestamp tolerance where available, reject stale signatures, and use provider event IDs or idempotency keys to make processing idempotent. Without this, attackers who obtain a valid signed request through logs, proxies, or test tooling can replay business events.
Missed variant 4: Event is authentic but not bound to the expected account, tenant, or event type
Webhook secret: shared across environments
Event account: connected-account-B
Application tenant: tenant-A
Accepted event types: all
Handler side effect: grants tenant-A subscription
Why it should be caught:
For multi-tenant SaaS, marketplaces, and connected-account integrations, a signature can prove that the provider sent the event but not that the event belongs to the current tenant, environment, connected account, or business flow. The skill should require event-source binding checks: provider account ID, environment, tenant/customer mapping, event type allowlist, object ownership, and secret rotation state.
Edge Cases
- Some providers use HMAC signatures, some use asymmetric signatures, and some use mTLS or signed JWTs; the checklist should be provider-agnostic but require the provider's documented verification method.
- Public webhook endpoints should not require normal end-user sessions, CSRF tokens, or browser cookies; those controls can break legitimate provider delivery.
- Queue-first webhook handlers are safe only if authenticity and freshness are verified before enqueueing side effects, or if the queue message carries verified provenance.
- Retrying providers can deliver duplicates legitimately; idempotency must not reject the first valid retry after a transient failure unless the side effect already succeeded.
- Test-mode and production-mode secrets/events should be isolated so a test event cannot mutate production state.
Remediation Quality
Comparison to Other Tools
| Tool / Framework |
Catches this? |
Notes |
| OWASP API Security Top 10 API10 |
Partial |
Covers unsafe consumption of APIs, but the skill needs concrete webhook authenticity and replay checks in its own checklist. |
| Stripe webhook signature guidance |
Yes for Stripe |
Requires verifying signatures with the endpoint secret and raw payload semantics, but this is provider-specific and should be generalized. |
| Slack request signing guidance |
Yes for Slack |
Uses signing secret plus timestamp freshness to mitigate replay, which is a useful pattern for the skill. |
| Semgrep / CodeQL |
Partial |
Can flag missing verifier calls or parsed-body pitfalls in some frameworks, but reviewers still need provider account, tenant, idempotency, and event-type evidence. |
| API gateway authentication checks |
No |
Gateways often see webhook endpoints as unauthenticated public routes and cannot prove provider-specific event authenticity or business-object binding. |
Overall Assessment
Strengths:
- Strong OWASP API Top 10 coverage with clear BOLA/BFLA distinctions and practical REST/GraphQL examples.
- Good API9 inventory guidance and API10 upstream response validation guidance.
- Useful warning that internal and third-party API data must be treated as untrusted.
Needs improvement:
- Inbound webhook/event-source consumption is not explicitly covered under API10.
- The output format does not require event authenticity, replay, idempotency, or tenant/account binding evidence.
- Public signed webhooks need severity calibration so intentionally unauthenticated receivers are not reported as ordinary missing-auth findings.
- Raw body handling and environment-specific webhook secrets are common implementation pitfalls that should be called out.
Priority recommendations:
- Add a
Webhook and Event Source Authenticity subsection to API10 covering signature/mTLS/JWT verification, raw body preservation, timestamp tolerance, and replay prevention.
- Add an evidence table with
Provider, Verification method, Raw body preserved?, Timestamp tolerance, Replay/idempotency key, Allowed event types, Provider account, Tenant/customer binding, Environment, Secret rotation, and Evidence confidence.
- Add severity guidance: forged payment/account/security events should be High/Critical; missing idempotency for non-sensitive notifications may be Medium/Low; intentionally public but correctly signed webhooks should not be reported as missing user authentication.
Sources Checked
Bounty Info
Skill Being Reviewed
Skill name:
api-securitySkill path:
skills/appsec/api-security/False Positive Analysis
Benign webhook receiver that can be over-reported if reviewers only see a public unauthenticated endpoint:
Why this is a false positive risk:
Webhook endpoints are intentionally reachable without user authentication, so a review that only applies the normal API2/API5 authentication checklist can flag them as missing auth. The security decision depends on a different trust model: provider-specific signature verification over the raw request body, timestamp tolerance, replay/idempotency handling, source binding to the expected account/tenant, and event-type allowlisting. The current skill says to inventory downstream dependencies and unsafe consumption, but it does not give reviewers a dedicated way to distinguish an intentionally public signed webhook receiver from an unauthenticated endpoint that accepts forged business events.
Coverage Gaps
Missed variant 1: Webhook accepts forged events because no signature or timestamp is verified
Why it should be caught:
This is API10 unsafe consumption of APIs and often API6 business-flow abuse. The API consumes a third-party event as if it were authoritative, but any caller can synthesize the event. The review checklist currently validates upstream response schemas, TLS, timeouts, redirects, and sanitization, but not inbound provider authenticity for webhook-style APIs.
Missed variant 2: Signature verification is present but broken by parsed-body verification
Why it should be caught:
Many webhook providers sign the exact byte stream. Re-serializing parsed JSON can change whitespace, key ordering, encodings, or body bytes, causing teams to disable verification or build a verifier that does not match provider semantics. The skill should require reviewers to verify whether the raw body is preserved until signature verification completes.
Missed variant 3: Replay and duplicate delivery are not handled
Why it should be caught:
Valid signatures do not prove freshness or one-time processing. Webhook endpoints should enforce provider timestamp tolerance where available, reject stale signatures, and use provider event IDs or idempotency keys to make processing idempotent. Without this, attackers who obtain a valid signed request through logs, proxies, or test tooling can replay business events.
Missed variant 4: Event is authentic but not bound to the expected account, tenant, or event type
Why it should be caught:
For multi-tenant SaaS, marketplaces, and connected-account integrations, a signature can prove that the provider sent the event but not that the event belongs to the current tenant, environment, connected account, or business flow. The skill should require event-source binding checks: provider account ID, environment, tenant/customer mapping, event type allowlist, object ownership, and secret rotation state.
Edge Cases
Remediation Quality
Comparison to Other Tools
Overall Assessment
Strengths:
Needs improvement:
Priority recommendations:
Webhook and Event Source Authenticitysubsection to API10 covering signature/mTLS/JWT verification, raw body preservation, timestamp tolerance, and replay prevention.Provider,Verification method,Raw body preserved?,Timestamp tolerance,Replay/idempotency key,Allowed event types,Provider account,Tenant/customer binding,Environment,Secret rotation, andEvidence confidence.Sources Checked
Bounty Info