Skip to content

pwnshop: add --log-failures option - #87

Merged
zardus merged 1 commit into
mainfrom
split/pr85-log-failures
Feb 6, 2026
Merged

pwnshop: add --log-failures option#87
zardus merged 1 commit into
mainfrom
split/pr85-log-failures

Conversation

@ConnorNelson

Copy link
Copy Markdown
Member

Split out of #85. Adds a --log-failures option to the pwnshop test command.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dfec5907cd

ℹ️ 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".

failed.setdefault(challenge, []).append("<build>")
failed_count += 1
if log_failures:
log_file = log_failures / challenge / "_build_error.log"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep failure logs rooted under --log-failures directory

If a user passes an absolute challenge target (which this command accepts), challenge becomes an absolute Path, so log_failures / challenge ignores log_failures and writes logs to the absolute challenge path instead of DIR/.... This means --log-failures can silently write outside the requested directory (or fail with permission errors), which breaks the option’s documented behavior; the joined challenge path should be normalized to a relative path before concatenation.

Useful? React with 👍 / 👎.

@zardus
zardus merged commit 5d46f77 into main Feb 6, 2026
5 checks passed
@zardus
zardus deleted the split/pr85-log-failures branch February 6, 2026 23:35
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.

2 participants