regression tests from cyber2 and cyber3#267
Conversation
|
|
@codex review this PR Please use the following severity format for all findings:
Prefix each finding title with its priority label, e.g. "P0: ...", "P1: ...", etc. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e72f2db57
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { cat; } </etc/passwd | ||
| cat <ok.txt | ||
| expect: | ||
| stdout: "ok-payload" |
There was a problem hiding this comment.
P3: Use required block scalar for scenario output
AGENTS.md for /workspace/rshell says to “Always use the YAML |+ block scalar for input.script, expect.stdout, and expect.stderr values, even single-line ones.” This new scenario uses an inline scalar for expect.stdout here, and the same pattern appears in several of the added scenario files, so the tests do not follow the repository’s documented scenario format.
Useful? React with 👍 / 👎.
What does this PR do?
Adds vulnerability-hunting test coverage from the
2026-05-19-gpt-5.5-cyber-2campaign across the shell interpreter and several builtins. Includes both Go tests and YAML scenarios.Areas covered:
/dev/null/ dynamic), fd duplication restoring streams, pipeline exit isolation, input redirect isolation, expansion output as data/dev/nulland file), blocked with readonly bodyuntilloops: composition with readonly body, redirected loop body writes, redirect to/dev/null, subshell isolationwhileloops: additional clause coveragecut: sandbox and special-file coveragedf: more resilient POSIX/-hparsing in testsgrep: numeric overflow rejectionpwd: symlink cwd coveragestrings: vuln hunt coverageMotivation
Part of the ongoing vuln-hunt campaign to harden the safe shell interpreter against attacks via shell control structures, redirects, and builtin edge cases.
Testing
go test ./....Checklist