Repository navigation
feat(flows): access check with a second user (OWASP API1) - #151
Merged
Merged
Conversation
The demo bookstore gets a second account (second@example.com) and
records who added each book. DELETE /books/{bookId} refuses another
reader's book with 403 (now documented), while PUT deliberately does
not check the owner, so an access check finds it. Sample books have no
owner and stay editable by any signed-in reader.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each lifecycle flow offers an access check: the first user creates a record, a second user tries to read, change, and delete it and must get 403 or 404, and the first user checks it is still there and cleans up. Only steps whose endpoint documents a credential are tried, every attempt runs on its own, and a 401 for the second user is reported as inconclusive rather than a pass. The second user's credentials (typed, or from the contract's sign-in request) stay in the tab's memory only and are masked in evidence like the first user's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.20.0 is being released separately (#150) for the CLI --workspace work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main released 1.20.0 (#150); this branch stays 1.21.0, listed above it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Retries the two-user IDOR idea as a defensive check of the user's own API.
always_run), so one success does not hide the others; a 401 for the second user is reported as inconclusive, not as a pass; the check cannot start until the second user has a value for every credential the first user sends (otherwise a request would silently go out with the first user's token).secret_namesmasking hides them in evidence. No backend API change.second@example.com/second-password) and book owners.DELETE /books/{bookId}refuses another reader's book with 403 (now documented);PUTdeliberately does not check the owner, so the access check finds a real gap in the demo. Sample books stay ownerless, so existing runs behave as before. New demo tour step.Test plan
pytest: 319 passed (new: only the owner deletes a book, anyone signed in replaces it, sample books stay editable)ruff check backend --select F,E9,Ivitest run: 247 passed (new: derived steps and order, protected-steps-only, second user's credentials only on second-user steps, missing-credential messages, per-attempt findings incl. 401, actor kept in Run history)playwright test: 27 passed (the demo test signs in the second reader, runs the access check, and sees "could change" (200) and "could not delete" (403); the workspace contains no second-user secret)🤖 Generated with Claude Code