GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(id): neutralize executable URL schemes in imported Markdown links by dezren39 · Pull Request #7198 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 8, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Opened by the branch-disposition execution (2026-11-07) from branch queue/9775-5745-markdown-link-schemes.

Branch origin: queue branch for issue #9775.
This branch was laptop-local work (or a stranded remote branch) with real changes ahead of main and no PR. Per Drew's 2026-11-07 branch-disposition ruling, ahead branches with real changes get a PR; this PR surfaces the work for triage instead of leaving it stranded on a branch.

Triage owner: batch issue in developing-today/code, "Unowned PR batch from branch disposition (2026-11-07)". Outcome per batch triage: close with reason, or route to impl/finish/merge as a follow-on fix task.

Evidence: branch-ahead review ~/workspace/scratch/branch-ahead-review-2026-11-07.md; execution log ~/workspace/scratch/branch-disposition-2026-11-07.md.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
developing-today[bot]
fix(id): neutralize executable URL schemes in imported Markdown links
49aad00
- Add is_safe_link_url helper to classify URLs for imported Markdown
- Reject javascript:, data:, vbscript: and other executable schemes in
  markdown_to_prosemirror links, images, and raw HTML anchors
- Drop linked-image sequences when the anchor href is unsafe to avoid
  storing unsafe linkHref values
- Add regression tests for URL scheme allowlist and linked-image handling

Fixes #5745
@dezren39
dezren39 requested a review from a team as a code owner November 8, 2026 04:37
@coderabbitai

coderabbitai Bot commented Nov 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 44 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 120068d7-1c12-4e1c-a2f3-76de15ea4c0e
Commits

Reviewing files that changed from the base of the PR and between 1e46b89 and 49aad00.

Files ignored due to path filters: 1

  • pkgs/id/Cargo.lock is excluded by !**/*.lock
Files selected for processing: 2

  • pkgs/id/Cargo.toml
  • pkgs/id/src/web/markdown.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 8, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 49aad00597

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/src/web/markdown.rs
Comment on lines +61 to +63
["http", "https", "mailto"]
.iter()
.any(|allowed| scheme.eq_ignore_ascii_case(allowed))

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 8, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the repository's native reference URL scheme

When importing Markdown containing the repository's supported reference format, this allowlist rejects id://{hash} and id://{hash}@{revision}, which Reference::to_markdown explicitly emits in pkgs/id/src/references.rs:130–145. The link conversion consequently replaces those targets with about:invalid. Since Markdown is imported through this converter (collab.rs:151) and saved from the converted document (routes.rs:2595–2599), opening and saving such a document permanently discards its reference targets. Preserve validated native reference URLs rather than treating them as executable schemes.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/src/web/markdown.rs
Comment on lines +5726 to +5728
let link = &doc["content"][0]["content"][0];
assert_eq!(link["type"], "text");
let marks = link["marks"].as_array().unwrap();

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 8, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Select the linked nodes in the new regression tests

Both new tests fail before validating the intended behavior. Here, child zero is the unmarked Click text, so accessing its marks with as_array().unwrap() panics. In the linked-image test, content[1] is the separating space rather than the linked image, so its image assertion also fails. Select the marked text and linked image explicitly, as the existing test_link does. After correcting selection, also reconcile the linked-image expectation: the implementation copies the sanitized about:invalid into linkHref, whereas the new test requires that attribute to be absent.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/src/web/markdown.rs
Comment on lines +3937 to +3938
if !is_safe_link_url(src) {
return None;

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 8, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve embedded raster images across resize and reopen

For an embedded PNG such as ![pixel](data:image/png;base64,...), the normal Markdown image arm still preserves the source and the editor displays it. Resizing commits dimensions (web/src/image-node-view.ts:225), causing the serializer to emit an HTML <img> instead of Markdown (markdown.rs:4998–5020). On reopening, this new check rejects the same image's data: source, and the HTML fallback displays literal markup instead of the image. Use image-specific source validation that permits safe embedded raster formats, so resizing an otherwise supported image does not break its save/reopen round trip.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/src/web/markdown.rs
Comment on lines +3021 to +3022
if !is_safe_link_url(link.url) {
attrs["href"] = json!("about:invalid");

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 8, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore protected newlines before validating link schemes

For a safe destination containing a leading newline or a newline within its HTTPS scheme, such as [x](<https\n://example.com>), the existing protect_newline_destinations pass replaces the newline with a placeholder before conversion. This check therefore sees httpsidweb-newline-0-token: rather than https: and replaces the destination with about:invalid. restore_attr_newlines runs only after conversion (markdown.rs:167–180), when the original target has already been discarded. Validate the restored destination instead of the placeholder-bearing string so the codec's supported newline-preserving links remain intact while executable schemes are still rejected.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T04:42:09.124485Z 49aad00 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@developing-today developing-today Bot mentioned this pull request Nov 8, 2026
Unowned PR batch from branch disposition (2026-11-07) #7297
Open
@dezren39

dezren39 commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · picked up

  • Agent: queue worker (repo-worker-code), lane code-l
  • Session / ID: task 13507
  • Found via: queue claim
  • Task: Shepherd PR fix(id): neutralize executable URL schemes in imported Markdown links #7198 (fix(id): neutralize executable URL schemes in imported Markdown links) — revalidate fresh, disposition Codex findings, drive to merge or a reasoned close. Batch owner issue Unowned PR batch from branch disposition (2026-11-07) #7297 part 7 of 9.
  • Expectation: effort class m; done = PR fix(id): neutralize executable URL schemes in imported Markdown links #7198 merged, or closed with a recorded reason and salvage note.
  • Links: PR fix(id): neutralize executable URL schemes in imported Markdown links #7198, branch queue/9775-5745-markdown-link-schemes, issue Unowned PR batch from branch disposition (2026-11-07) #7297
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 added work/assigned Queue worker lifecycle state queue/claimed Queue worker lifecycle state status/in-progress Queue worker lifecycle state labels Nov 8, 2026
@developing-today

developing-today Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

🤖 Agent note · done — closing as superseded

  • Agent: queue worker (repo-worker-code), lane code-l
  • Session / ID: task 13507
  • Found via: queue claim
  • Task: Shepherd PR fix(id): neutralize executable URL schemes in imported Markdown links #7198 for batch issue Unowned PR batch from branch disposition (2026-11-07) #7297 (part 7 of 9) — verified fresh, diffed against current main, closing as superseded.
  • Expectation: done — outcome superseded recorded for task 13507; no code from PR fix(id): neutralize executable URL schemes in imported Markdown links #7198 needs to land.

Why superseded. The fix for issue #5745 already merged to main through other queue work: PR #6339 (commit d492d6a, Markdown link schemes) and PR #6592 (merged 2026-11-08T14:58Z, image URLs, issue #6364). Current main carries link_url_is_safe / sanitize_link_url and image_url_is_safe / sanitize_image_url in pkgs/id/src/web/markdown.rs, applied at every call site PR #7198 patched (Link arm, Image arm, parse_img_tag, parse_anchor_tag, linked images) plus serializer paths PR #7198 did not cover — with a stricter scheme grammar and a round-trip-stable # sentinel instead of this PR's about:invalid / drop approach. Salvage diff per protocol: no unique code in PR #7198 (3 files, +102) beyond what main already has in stronger form.

Independent staleness evidence. PR #7198 as pushed does not compile with the web feature: its Link-arm call passes link.url (String) to is_safe_link_url(&str) — verified locally with cargo test --features web --lib on the branch head (E0308 at that call site).

Codex findings on PR #7198 — disposition of all 4 P2s:

  • Test-selection failures in the PR's own regression tests, and embedded raster data: images in HTML <img>: moot — main's merged implementation has its own passing coverage for both (markdown module suite on current main includes test_link_executable_schemes_neutralized, test_raw_html_image_sources_are_sanitized).
  • Native id://{hex} / id://{hex}@{hex} reference URLs and newline-placeholder (idweb-newline-<n>-token) destinations: not handled by main's oracle either (grep-verified on origin/main: no id:// handling; the oracle strips real newlines but not the placeholder token). These two analysis leads — the only salvageable content — are forwarded to issue id(web): neutralize executable URL schemes in imported Markdown links #5745, which is still open, as verification items against main.

Local fix work done this shift before supersession was established (Codex-finding fixes + tests, markdown suite 241/241 passing locally) was never pushed and is discarded with the worktree; the branch on GitHub is untouched by this shift except labels/notes.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@developing-today developing-today Bot closed this Nov 8, 2026
@developing-today developing-today Bot removed work/assigned Queue worker lifecycle state queue/claimed Queue worker lifecycle state status/in-progress Queue worker lifecycle state labels Nov 8, 2026
@developing-today developing-today Bot mentioned this pull request Nov 8, 2026
id(web): neutralize executable URL schemes in imported Markdown links #5745
Closed
4 tasks
@developing-today

developing-today Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

🤖 Agent note · correction (claim lost after work completed)

  • Agent: queue worker (repo-worker-code), lane code-l
  • Session / ID: task 13507
  • Task: Correction to the closing note on PR fix(id): neutralize executable URL schemes in imported Markdown links #7198 (comment 6726973992): after the PR was closed and all outcome notes were posted, the queue returned the verdict "task 13507 is not claimed by repo-worker-code" at the final checkpoint — the claim-loss signature previously seen on task 12932 and task 12761 (claim + early checkpoints succeed; the claim is gone later in the shift). A fallback claim on PR fix(id): neutralize executable URL schemes in imported Markdown links #7198 was attempted and could not execute (the fallback tool's own gh calls are blocked by the user token's GraphQL rate limit).
  • Expectation: the outcome for task 13507 stands exactly as recorded in comment 6726973992 (PR fix(id): neutralize executable URL schemes in imported Markdown links #7198 closed as superseded by PR fix(id/web): neutralize executable URL schemes in Markdown links (#5745) #6339 / PR fix(id): neutralize unsafe image URLs #6592; salvage leads forwarded to issue id(web): neutralize executable URL schemes in imported Markdown links #5745) plus the outcome note on issue Unowned PR batch from branch disposition (2026-11-07) #7297 (comment 6726990393). This note is the durable terminal record for task 13507; this lane did not complete/park it in the queue because the claim no longer exists.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@developing-today

developing-today Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

🤖 Agent note · done (duplicate claim resolved) — Agent: repo queue worker, lane code-b (repo-worker-code). Task: task 13507 (pr_shepherd, PR #7198). This lane claimed task 13507 after lane code-l had already worked it: PR #7198 was closed as superseded by lane code-l at 2026-11-08T20:53:19Z with the outcome recorded on this PR (note 6726973992). Lane code-b verified that state fresh and completed task 13507 as superseded on that evidence — no duplicate work performed. The double claim and code-l's lost completion are the known cross-lane claim-integrity defect (code#6853 pattern).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/9775-5745-markdown-link-schemes branch November 14, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.