Skip to content

fix(ENG-12465): use absolute URLs for README images to fix npm display#27

Closed
hiskudin wants to merge 5 commits intomainfrom
fix/readme-npm-image-paths
Closed

fix(ENG-12465): use absolute URLs for README images to fix npm display#27
hiskudin wants to merge 5 commits intomainfrom
fix/readme-npm-image-paths

Conversation

@hiskudin
Copy link
Copy Markdown
Collaborator

Summary

  • Replaces relative image paths (assets/banner-*.svg, assets/demo-*.svg) with absolute raw.githubusercontent.com URLs
  • npm's markdown renderer has no base URL context so relative paths produce broken image tags; GitHub resolves them fine which masked the issue

Test plan

  • Verify images render on the npm package page after publish
  • Verify images still render correctly on GitHub

🤖 Generated with Claude Code

hiskudin and others added 4 commits March 24, 2026 15:30
Replaces baseline ONNX model with full-aug-dojo-jailbreak-jbv2.

Training additions over baseline:
- jasperls: JasperLS jailbreak dataset
- jailbreakbench (527): DAN, roleplay, persona-override attacks
- toxic-chat (113): human-verified real jailbreaks
- chatgpt-jailbreaks (79): classic named templates

AgentShield: 73.7 → 79.8 (composite 77.2 → 87.4, penalty 3.51 → 7.54)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Relative paths (assets/banner-*.svg, assets/demo-*.svg) resolve
correctly on GitHub but break on npm's markdown renderer which has
no base URL context. Replaced with raw.githubusercontent.com URLs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 26, 2026 09:08
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 6 files

@hiskudin hiskudin changed the title fix: use absolute URLs for README images to fix npm display fix (ENG-12465): use absolute URLs for README images to fix npm display Mar 26, 2026
@hiskudin hiskudin changed the title fix (ENG-12465): use absolute URLs for README images to fix npm display fix(ENG-12465): use absolute URLs for README images to fix npm display Mar 26, 2026
@hiskudin
Copy link
Copy Markdown
Collaborator Author

Closing in favour of a clean single-commit PR.

@hiskudin hiskudin closed this Mar 26, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates package-facing documentation so README images render correctly on npm (which doesn’t resolve relative asset paths), and adjusts tooling config around vendored model artifacts.

Changes:

  • Replace relative assets/*.svg references in README.md with absolute raw.githubusercontent.com URLs.
  • Update Biome file inclusion rules to exclude src/classifiers/models/**.
  • Modify vendored MiniLM model JSON artifacts (config.json, tokenizer_config.json) (appears unrelated to README image rendering).

Reviewed changes

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

File Description
src/classifiers/models/minilm-full-aug/tokenizer_config.json Updates tokenizer config fields (incl. a new max_length), affecting bundled model artifacts.
src/classifiers/models/minilm-full-aug/config.json Reformats and changes transformers_version in vendored model config.
biome.json Excludes src/classifiers/models/** from Biome processing.
README.md Switches README image sources to absolute URLs for npm rendering.

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

Comment on lines +4 to +5
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/StackOneHQ/defender/main/assets/banner-dark.svg" />
<img src="https://raw.githubusercontent.com/StackOneHQ/defender/main/assets/banner-light.svg" alt="Defender by StackOne — Indirect prompt injection protection for MCP tool calls" width="800" />
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

These image URLs are pinned to the main branch on GitHub. That makes the README for older published npm versions non-deterministic (images can change or break if assets move). Consider pinning to a release tag/commit SHA (or a CDN URL that includes a tag) so the npm README stays stable per package version.

Suggested change
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/StackOneHQ/defender/main/assets/banner-dark.svg" />
<img src="https://raw.githubusercontent.com/StackOneHQ/defender/main/assets/banner-light.svg" alt="Defender by StackOne — Indirect prompt injection protection for MCP tool calls" width="800" />
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/StackOneHQ/defender/v0.1.0/assets/banner-dark.svg" />
<img src="https://raw.githubusercontent.com/StackOneHQ/defender/v0.1.0/assets/banner-light.svg" alt="Defender by StackOne — Indirect prompt injection protection for MCP tool calls" width="800" />

Copilot uses AI. Check for mistakes.
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.

2 participants