Skip to content

examples: add reaction lifecycle fixture - #5

Closed
idy wants to merge 1 commit into
mainfrom
codex/reaction-lifecycle-smoke
Closed

examples: add reaction lifecycle fixture#5
idy wants to merge 1 commit into
mainfrom
codex/reaction-lifecycle-smoke

Conversation

@idy

@idy idy commented Jul 23, 2026

Copy link
Copy Markdown
Member

Deliberate command-injection fixture for validating manual review reactions and native inline findings.

The workflow needs a deterministic security finding while its comment-reaction
lifecycle is validated end to end.

- add an explicit command-injection review fixture
- keep the test isolated from workflow implementation files

Generated with [Codex](https://github.com/openai)
@idy

idy commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@codex review

@github-actions github-actions Bot 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.

🤖 OpenAI PR review

Found an OS command injection in the new fixture.

1 inline finding published.

import { exec } from "node:child_process";

export function showRevision(request, response) {
exec(`git show ${request.query.revision}`, (error, output) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Avoid interpolating the request value into a shell command

request.query.revision is user-controlled and is interpolated into the shell command passed to exec, so a value such as HEAD; <command> executes arbitrary commands on the server. Validate it as a permitted revision format and invoke git without a shell (for example, execFile with argument array).

@idy

idy commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@codex review test reaction lifecycle

1 similar comment
@idy

idy commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@codex review test reaction lifecycle

@idy

idy commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@codex review focus on command injection

@idy

idy commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@codex review cancellation test one

@idy

idy commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@codex review cancellation test active

@idy

idy commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@codex review cancel-me

@idy

idy commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@codex review cancellation replacement

@idy

idy commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@codex review cancellation status test

@idy

idy commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@codex review final cancellation test

@idy

idy commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@codex review replacement after cancellation

@idy

idy commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

@codex review verify inline publishing

@github-actions github-actions Bot 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.

🤖 OpenAI PR review

The new fixture introduces command injection through an untrusted revision parameter.

1 inline finding published.

import { exec } from "node:child_process";

export function showRevision(request, response) {
exec(`git show ${request.query.revision}`, (error, output) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Avoid interpolating the revision into a shell command

exec invokes a shell, so an attacker-controlled request.query.revision can append shell syntax (for example, ; curl ...) and execute arbitrary commands in the process context. Validate the revision against an expected Git object format and invoke Git with argument-based execution (such as execFile('git', ['show', revision], ...)) rather than shell interpolation.

@idy

idy commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

Manual review, reaction lifecycle, cancellation state, discussion context, and inline publishing validated; closing the intentionally vulnerable smoke PR.

@idy idy closed this Jul 23, 2026
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