Skip to content

glucode/widpi-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prompt Injection Lab

A static, browser-only prompt injection demo that can be hosted on GitHub Pages.

The demo intentionally uses a deterministic simulator instead of a real AI API. It shows how untrusted content can override a naive prompt by asking an agent to open the system Calculator app, then compares simple mitigations.

This project does not open Calculator or any other local app. It is safe to host as static GitHub Pages content because the risky behavior is simulated in the browser.

  • Delimiting untrusted content
  • Detecting instruction-like text before generation
  • Constraining output to an allowlisted schema

Run locally

Open index.html in a browser, or serve the folder with any static file server.

python3 -m http.server 8080

Publish on GitHub Pages

  1. Push these files to a GitHub repository.
  2. Open the repository settings.
  3. Go to Pages.
  4. Set the source to the main branch and /root.
  5. Save, then open the generated Pages URL.

No build step, package install, backend, or API key is required.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors