Replace threat-detection XML marker token across JS and spec#32458
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
Replace threat detection XML marker token in specs and JavaScript
Replace threat-detection XML marker token across JS and spec
May 15, 2026
Copilot created this pull request from a session on behalf of
pelikhan
May 15, 2026 18:51
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces the threat-detection XML comment marker token from <!-- agentic threat detected --> to <!-- gh-aw-thread-detected --> in the runtime JS helpers, the normative Safe Outputs specification, and all related test assertions. Human-facing caution text (agentic threat detected) is intentionally left unchanged.
Changes:
- Update the two marker helper return values in
threat_detection_warning.cjsto the new token. - Update the normative marker reference in
safe-outputs-specification.md. - Update marker assertions across
add_comment,generate_footer,messages,threat_detection_warning, andupdate_activation_commenttests.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/threat_detection_warning.cjs | Updates both getThreatDetectedMarker and getThreatDetectedMarkerTemplate to emit the new XML token. |
| actions/setup/js/threat_detection_warning.test.cjs | Updates marker helper assertions to expect the new token. |
| actions/setup/js/add_comment.test.cjs | Updates comment-body marker assertion. |
| actions/setup/js/generate_footer.test.cjs | Updates footer caution-alert marker assertion. |
| actions/setup/js/messages.test.cjs | Updates messages caution-alert marker assertion. |
| actions/setup/js/update_activation_comment.test.cjs | Updates inlined mock template to use the new token. |
| docs/src/content/docs/reference/safe-outputs-specification.md | Updates WTD1 normative marker text to the new token. |
Note: the new token spells "thread" rather than "threat", which appears to be an unintended typo given the surrounding "threat detection" context. See the inline comment.
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 7/7 changed files
- Comments generated: 1
Comment on lines
+30
to
+39
| @@ -36,7 +36,7 @@ function getThreatDetectedMarker(reason) { | |||
| * @returns {string} | |||
| */ | |||
| function getThreatDetectedMarkerTemplate() { | |||
| return "<!-- agentic threat detected -->"; | |||
| return "<!-- gh-aw-thread-detected -->"; | |||
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
pelikhan
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR updates the threat-detection XML marker used for machine-readable annotations from
agentic threat detectedtogh-aw-thread-detectedin runtime JS output and normative spec text. Human-facing caution copy remains unchanged.Runtime marker update (JavaScript)
<!-- gh-aw-thread-detected -->Assertion updates (JavaScript tests)
Specification alignment