Skip to content

docs(cedar): warn that onError proceed fails open - #5643

Merged
opieter-aws merged 1 commit into
strands-agents:mainfrom
opieter-aws:opieter-aws/onerror-proceed-security-fix
Oct 28, 2026
Merged

opieter-aws merged 1 commit into
strands-agents:mainfrom
opieter-aws:opieter-aws/onerror-proceed-security-fix

Conversation

@opieter-aws

Copy link
Copy Markdown
Contributor

Human Overview

Description

onError: 'proceed' makes CedarAuthorization fail open: if principalResolver or contextEnricher throws, the tool call runs with no Cedar check. The Python docs didn't mention this at all, and the TS docs had only a one-word "dangerous".

This adds an explicit fail-open warning wherever the option is documented.

Related Issues

Follow-up to #2365.

Documentation PR

Included

Type of Change

Documentation update

Testing

  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have reviewed and understand every line of code in this PR, including any generated by AI tools, and I can explain why it works
  • My change is focused and reasonably small; I have split unrelated work into separate PRs
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@opieter-aws
opieter-aws requested a review from a team as a code owner October 28, 2026 19:08
@opieter-aws
opieter-aws requested a review from liramon2 October 28, 2026 19:08
@github-actions github-actions Bot added documentation Documentation changes, improvements, additions, content updates, site improvements, examples, guides area-interventions Related to interventions labels Oct 28, 2026
@opieter-aws
opieter-aws requested review from lizradway and removed request for liramon2 October 28, 2026 19:09
@codecov

codecov Bot commented Oct 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

Assessment: Approve

Documentation-only change that adds an accurate, high-value fail-open warning for onError: 'proceed'. I verified every claim against the implementation in both SDKs and the docs match the actual behavior, with good Python/TypeScript parity.

Verification notes
  • Accuracy: Confirmed against interventions/registry.py::_handle_error (throw→raise, deny→Deny, proceed→None) and strands-ts/.../registry.ts (proceed→undefined). Cedar's principal_resolver/context_enricher are invoked without a local try/except, so their exceptions reach on_error — exactly as documented. The "Cedar engine failures are always fail-closed" statement also holds (the is_authorized call is wrapped and returns Deny).
  • Parity: Python docstring and the two TS JSDoc blocks are consistent in message and recommended alternative ('deny').
  • Docs mechanics: :::caution[...] aside and inline <Syntax> usage are consistent with existing patterns in the same files; no file moves, so no sourceLinks to update.

Nice catch promoting the one-word "dangerous" into an explicit, actionable warning.

@github-actions

Copy link
Copy Markdown
Contributor

Documentation Preview Ready

Your documentation preview has been successfully deployed!

Changed pages:

Updated at: 2026-10-28T19:12:50.633Z

@github-actions github-actions Bot added complexity/low Touched functions have low cognitive complexity (<=10) size/s labels Oct 28, 2026
@opieter-aws
opieter-aws merged commit 409cb54 into strands-agents:main Oct 28, 2026
62 checks passed
gautamsirdeshmukh pushed a commit to gautamsirdeshmukh/harness-sdk that referenced this pull request Nov 2, 2026

This branch was previously deployed

1 inactive deployment
auto-approve — f9f122b9 Deployed Oct 28, 2026 by opieter-aws via Build and Deploy Preview #3256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-interventions Related to interventions complexity/low Touched functions have low cognitive complexity (<=10) documentation Documentation changes, improvements, additions, content updates, site improvements, examples, guides size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants