docs: fix stale Permissions-Policy and CSP scoring criteria in README#90
Open
dmchaledev wants to merge 1 commit into
Open
docs: fix stale Permissions-Policy and CSP scoring criteria in README#90dmchaledev wants to merge 1 commit into
dmchaledev wants to merge 1 commit into
Conversation
The "Headers Checked" table said Permissions-Policy scores on mere presence and didn't mention CSP's base-uri/bare-scheme checks, but rules.ts requires camera/microphone/geolocation to be restricted for full credit and separately checks base-uri and bare-scheme sources. Update the table to match the actual scoring logic so users aren't misled about how to reach a good grade. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tzhr2b5BycnZ2yf98aiLZe
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
checkPermissionsPolicy(src/rules.ts) actually requirescamera=(),microphone=(), andgeolocation=()to be restricted for full credit — presence alone only earns half the points.base-uricheck or the bare-scheme/wildcard-source check (https:,*, etc.) thatcheckCSPperforms, both of which affect the score.Since this package's main value proposition is helping users reach a good grade, inaccurate scoring documentation is actively misleading — a reader could add a bare
Permissions-Policyheader expecting full marks and still land a "warning" status.Changes
No code changes — docs only.
Test plan
npx vitest run— 85 tests pass (unaffected, docs-only change)npm run typecheck— passessrc/rules.tsto confirm accuracy🤖 Generated with Claude Code
https://claude.ai/code/session_01Tzhr2b5BycnZ2yf98aiLZe
Generated by Claude Code