Skip to content

Block public access to suspicious pastes - #39

Merged
AliOsm merged 2 commits into
mainfrom
codex/suspicious-paste-access
Nov 11, 2026
Merged

AliOsm merged 2 commits into
mainfrom
codex/suspicious-paste-access

Conversation

@AliOsm

@AliOsm AliOsm commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Adds a suspicious boolean to Pastes, defaulting to false. When true, the existing shared access check returns a plain 403 response with Cache-Control: no-store for the share page, live subdomains, raw HTML, rendered preview, and Markdown. It runs before password/owner access and ETag handling, so existing access tokens and cached requests cannot bypass the block.

Content stays intact, clearing the flag restores access, and web/API republishing cannot change the flag. The migration does not flag any records; the requested production IDs will be updated separately after deployment.

The existing security CI was failing on outdated locked dependencies. Refreshes the affected dependencies within their existing major versions and Brakeman. Documents the unused MCP OAuth client discovery advisory as inapplicable: this application only hosts an MCP server with Doorkeeper, and never constructs an outbound MCP client. See the upstream advisory. Pins CI and deployment runners to Ubuntu 24.04 because ubuntu-latest now resolves to 26.04, which has no prebuilt Ruby 3.4.7; the application Ruby version is unchanged.

Validation:

  • 475 Rails tests, 2,373 assertions, zero failures/errors. Local run used existing CSS assets (SKIP_CSS_BUILD=1); CI builds assets normally.
  • Regression coverage for all public routes and aliases, HEAD requests, cached responses, password sessions/preview tokens, owners, republishing, and restoration.
  • RuboCop: 128 Ruby files, no offenses.
  • Brakeman: no warnings. Bundler Audit: no applicable vulnerabilities.

@AliOsm
AliOsm merged commit 7455fb5 into main Nov 11, 2026
3 checks passed
@AliOsm
AliOsm deleted the codex/suspicious-paste-access branch November 11, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant