Skip to content

🛡️ Sentinel: [HIGH] Fix YAML injection vulnerability in lexis frontmatter - #82

Open
Jandir wants to merge 1 commit into
mainfrom
sentinel-yaml-injection-lexis-9375078657468510735
Open

🛡️ Sentinel: [HIGH] Fix YAML injection vulnerability in lexis frontmatter#82
Jandir wants to merge 1 commit into
mainfrom
sentinel-yaml-injection-lexis-9375078657468510735

Conversation

@Jandir

@Jandir Jandir commented Aug 4, 2026

Copy link
Copy Markdown
Owner

🚨 Severity: HIGH
💡 Vulnerability: Unsanitized interpolation of metadata (like video titles or filenames) into double-quoted strings within YAML frontmatter in lexis.py allowed for YAML injection or parsing breakage if the metadata contained characters like ", \n, \r, or \.
🎯 Impact: An attacker could craft a video title that breaks the structure of the generated .md/.txt volumes, potentially manipulating subsequent processing logic (like NotebookLM ingestion) or causing application crashes during YAML parsing.
🔧 Fix: Added a _escape_yaml_string function in lexis.py that safely escapes \, \n, \r, and " and applied it to variables interpolated in the _format_lexis_block output.
Verification: Verified by checking that lexis.py compiles successfully and all unit tests in pytest tests/test_lexis.py and the test suite pass with no regressions.


PR created automatically by Jules for task 9375078657468510735 started by @Jandir

…neration

Added string escaping logic for values interpolated into double-quoted YAML strings in `lexis.py` to prevent formatting breakage or injection vulnerabilities from unescaped double quotes, newlines, and backslashes in video metadata.

Co-authored-by: Jandir <3695656+Jandir@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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