Skip to content

Conversation

ret2libc
Copy link
Collaborator

@ret2libc ret2libc commented Aug 4, 2025

Implements issue #220 by adding an interactive submit-project script that guides users through submitting custom challenges.

Features:

  • Extended challenge.py with submit-project subcommand
  • Interactive questionnaire following specified requirements
  • OSS-Fuzz project URL discovery using grep (no yaml import)
  • Support for diff mode (..) and full mode analysis
  • Automatic default branch detection
  • Added Makefile target for easy access
  • Validates user input and provides helpful feedback

Closes #220

Generated with Claude Code

- Extended challenge.py with submit-project subcommand
- Interactive questionnaire following specified requirements
- OSS-Fuzz project URL discovery using grep (no yaml import)
- Support for diff mode (..) and full mode analysis
- Automatic default branch detection
- Added Makefile target for easy access
- Validates user input and provides helpful feedback

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Riccardo Schirone <[email protected]>
@ret2libc
Copy link
Collaborator Author

ret2libc commented Aug 4, 2025

@claude address the review

Copy link
Contributor

claude bot commented Aug 4, 2025

Claude finished @ret2libc's task —— View job


Todo List

  • Read the challenge.py file to understand current implementation
  • Identify grep/sed usage around line 552 mentioned in review
  • Replace shell commands with equivalent Python code
  • Test the changes if possible
  • Commit and push the fixes

Changes Made

Replaced the shell command approach in get_project_git_url_from_oss_fuzz() with pure Python:

  • Before: Used bash -c with grep -E '^main_repo:' and sed 's/main_repo: *//g'
  • After: Uses Python file reading with regex parsing via re.match()
  • Improvements:
    • Proper temporary directory management with tempfile.mkdtemp()
    • Better error handling for file operations
    • More robust regex pattern for parsing YAML values with/without quotes
    • Cleaner resource cleanup

The function now parses the project.yaml file line by line looking for main_repo: entries and extracts the URL value using a regex pattern that handles both quoted and unquoted values.

Review feedback addressed! The grep and sed commands have been replaced with pure Python code as requested. Changes committed and pushed to the PR branch.

claude bot and others added 5 commits August 4, 2025 12:35
- Replace shell commands in get_project_git_url_from_oss_fuzz() with pure Python
- Use tempfile.mkdtemp() for proper temporary directory management
- Parse project.yaml line by line with regex for main_repo extraction
- Handle both quoted and unquoted YAML values
- Improve error handling and resource cleanup

Co-authored-by: Riccardo Schirone <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a submit-project script/make-target to guide the user through submitting a custom challenge
1 participant