Skip to content

Sanitize team member anchor slugs - #93

Closed
VatsalSy wants to merge 793 commits into
mainfrom
comphy-lab/fix-xss-vulnerability-from-unescaped-team-slug
Closed

Sanitize team member anchor slugs#93
VatsalSy wants to merge 793 commits into
mainfrom
comphy-lab/fix-xss-vulnerability-from-unescaped-team-slug

Conversation

@VatsalSy

Copy link
Copy Markdown
Member

Motivation

  • Prevent a stored XSS/attribute-injection vector caused by interpolating raw m.slug into an anchor href by ensuring the href uses a slugified/sanitized identifier.

Description

  • In _team/index.md derive a single Liquid member_id with m.slug | default: m.name | slugify and reuse {{ member_id }} for both the <article id> and the present-member name link href, preserving deep-link behavior while avoiding unescaped interpolation.

Testing

  • Ran ./scripts/lint-check.sh (passed) and npm test -- command-data.test.js (Jest tests passed); bundle exec jekyll build --destination /tmp/comphy-site-build was attempted but blocked by missing local Jekyll/Bundler/Ruby environment in the execution environment.

Codex Task

VatsalSy and others added 30 commits November 9, 2025 15:25
- Capitalize 'Markdown' in add-person.md documentation
- Fix quote escaping in teaching.js selector strings
- Break long selector string into multiple lines for readability
October 2025 website updates - Team, research, teaching additions
- Add js-yaml override to force version >=4.1.1
- Resolves Dependabot alerts #10 and #11
- Fixes prototype pollution in YAML merge operations
Add volume 22 and page range 657-667 for the stood-up drop paper now that it's officially published.
Adds comprehensive command-line options to both scripts:

Build script (build.sh):
- --help: Display usage information
- --clean: Force rebuild by removing _site and .jekyll-cache
- --skip-deps: Skip dependency installation for faster rebuilds
- --skip-seo: Skip SEO metadata generation
- --skip-research: Skip research page generation

Deploy script (deploy.sh):
- --help: Display usage information
- --port PORT: Use specific port instead of auto-detection
- --host HOST: Bind to specific host (default: localhost)
- --drafts: Include draft posts in build
- --incremental: Enable faster incremental rebuilds
- --no-livereload: Disable live reload feature
- --open: Auto-open browser after server starts

Both scripts maintain backward compatibility and include improved
error handling and user feedback.
Adds year-based organization to News.md and history.md:
- Creates separate sections for 2026 and 2025
- Moves Durham University announcement under 2025 heading
- Adds paper [21] (Soft Matter) to January 2026 section
- Maintains 5-item limit for regular news items
- Updates add-news command to handle year sections
- Special announcements now excluded from 5-item count

This structure makes the news system more scalable as we enter 2026.
Changes to aboutCoMPhy.md:
- Update location badge from Physics of Fluids to Durham University
- Change map link to Durham campus location
- Remove mailto badge to avoid duplicate email display
- Keep two email containers with envelope and copy functionality
Keep shared command definitions in the OpenCode directory. Ignore the local .claude symlink so it stays machine-specific.
Reject missing or non-numeric port values and missing host args up front. Clarify news month ordering guidance to match reverse-chronological usage.
Generate the GitHub App token before checkout and push via origin so
updates are attributed to the app for ruleset bypass.
Force author and committer identity to the GitHub App bot and
log the latest commit metadata for verification.
Preserve jsdom globals in Jest setup and align tests.
Scope markdownlint to repo ignores and quiet noisy content.
Relax ESLint max-len/no-console for legacy scripts and fix CSS spacing.
VatsalSy and others added 22 commits April 25, 2026 08:39
The legacy --research-list-text chain in styles.css resolves to
--color-secondary, which bridge.css remaps to --c-paper-tint --
invisible on dark paper. --c-brand-blue also lacks a dark override,
leaving the Highlights heading dim. Override both in research-v2.css
with theme-aware values.
Website v2: design-system migration, redesigned homepage + team + research + news
Pad table separator rows for markdownlint MD060
Replace the broken /VatsalSy and /comphy-bot footer routes with live external destinations so the v2 footer no longer emits 404s.
Adds the Tiny Defects, Big Consequences news item that was
only in News.md but not in the structured feed. Fixes typo
in URL (tiniy -> tiny).

Closes #5182
- Added news item for the award (kind: award, date: 2026-05-28)
- Added featured hero work entry showcasing the award video on landing page
- Added the image as poster frame for the video hero slide
- Updated index.html to support poster attribute on video elements
Update npm and Ruby dependency constraints to resolve the current Dependabot alerts for fast-uri, PostCSS, and Nokogiri. Also refresh markdownlint-cli2/ws-resolved dev dependencies so npm audit is clean.
Copilot AI review requested due to automatic review settings June 29, 2026 06:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR removes a stored XSS / attribute-injection vector on the Team page by ensuring the in-page anchor link uses a sanitized, slugified identifier rather than interpolating raw m.slug into the href. It also aligns the href fragment with the corresponding <article id> so deep links resolve consistently.

Changes:

  • Introduces a per-member Liquid member_id derived from m.slug | default: m.name | slugify.
  • Reuses member_id for both the present-member <article id> and the name-link href fragment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants