8000 fix: tasks with no file flag need input_chunk_size=1 by ocervell · Pull Request #668 · freelabz/secator · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: tasks with no file flag need input_chunk_size=1 #668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2025
Merged

Conversation

ocervell
Copy link
Contributor
@ocervell ocervell commented May 25, 2025

Summary by CodeRabbit

  • New Features

    • Improved error messages now allow for custom text in certain cases.
    • Input processing for several tasks now handles data in smaller, more manageable chunks for greater reliability.
  • Bug Fixes

    • Enhanced handling of missing output files in the wpprobe task, providing clearer error feedback.
  • Refactor

    • Updated configuration of multiple tasks to streamline input handling and remove unused attributes.

Copy link
Contributor
coderabbitai bot commented May 25, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Several task classes were updated to adjust input handling by removing input_flag or file_flag attributes and introducing or consolidating input_chunk_size = 1. The Error class now allows an optional custom message in from_exception. The wpprobe task improved command handling and error reporting, including file existence checks and refined string manipulation.

Changes

File(s) Change Summary
secator/output_types/error.py Error.from_exception now accepts an optional message keyword argument to override the default error text.
secator/tasks/grype.py file_flag changed from OPT_NOT_SUPPORTED to None; added input_chunk_size = 1.
secator/tasks/nmap.py Removed class attribute input_flag = None.
secator/tasks/searchsploit.py Removed input_flag = None; added and consolidated input_chunk_size = 1.
secator/tasks/trivy.py Replaced input_flag = None with input_chunk_size = 1.
secator/tasks/wpprobe.py Enhanced on_cmd and on_cmd_done: regex replacement, file existence check, improved error handling.
secator/tasks/wpscan.py Removed file_flag = None; added input_chunk_size = 1.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant wpprobe
    participant FileSystem
    participant Error
    participant Info

    User->>wpprobe: Run task
    wpprobe->>FileSystem: Check if output JSON exists
    alt File exists
        wpprobe->>Info: Yield info about saved JSON
        wpprobe->>wpprobe: Parse results and yield data
    else File missing
        wpprobe->>Error: Yield Error with message about missing file
        wpprobe-->>User: Return early
    end
Loading

Poem

In the warren of code, a chunk at a time,
Rabbits adjust flags, making logic sublime.
Errors now whisper with messages anew,
And wpprobe checks files before hopping through.
With each little tweak, the garden grows bright—
Code carrots for all, and bugs out of sight!
🥕


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f223120 and 69c5284.

📒 Files selected for processing (7)
  • secator/output_types/error.py (1 hunks)
  • secator/tasks/grype.py (1 hunks)
  • secator/tasks/nmap.py (0 hunks)
  • secator/tasks/searchsploit.py (1 hunks)
  • secator/tasks/trivy.py (1 hunks)
  • secator/tasks/wpprobe.py (1 hunks)
  • secator/tasks/wpscan.py (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ocervell ocervell merged commit a088c94 into main May 25, 2025
7 of 8 checks passed
@ocervell ocervell deleted the minor-fixes branch June 4, 2025 19:27
ocervell added a commit that referenced this pull request Jun 5, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.16.0](v0.15.1...v0.16.0)
(2025-06-05)


### Features

* **`dnsx`:** merge `dnsxbrute` into `dnsx`
([#571](#571))
([d30a497](d30a497))
* add task revoke state and perf improvements
([#678](#678))
([2a3bf08](2a3bf08))
* allow returning errors in hooks
([#632](#632))
([39a56bd](39a56bd))
* improve bbot output types
([#627](#627))
([3b0aa5d](3b0aa5d))
* improve runner logic, workflow building, results filtering logic; and
add config defaults for profiles & drivers
([#673](#673))
([df94657](df94657))
* improve template loading flow
([#667](#667))
([f223120](f223120))
* memory optimizations
([#681](#681))
([d633133](d633133))
* **misc:** condition-based runs, chunked_by opts, dynamic task
profiles, cli improvements
([#659](#659
8000
))
([e8225cd](e8225cd))
* **runner:** add input validation to all tasks and workflows
([#663](#663))
([8392551](8392551))
* **runner:** improve option handling
([#670](#670))
([59b1c68](59b1c68))
* **scans:** improve scans
([#660](#660))
([bdd38ec](bdd38ec))
* use os system for CLI and better labs
([#649](#649))
([8b49912](8b49912))
* **workflow:** improve subdomain_recon workflow
([#657](#657))
([bc65092](bc65092))


### Bug Fixes

* allow dry-run mode to work without targets
([#624](#624))
([cccffb9](cccffb9))
* check task is registered before running test
([1f5cd83](1f5cd83))
* formatting for dynamic opts
([#628](#628))
([dcbbfe9](dcbbfe9))
* header options conversion
([#633](#633))
([6ae8423](6ae8423))
* header parsing
([#629](#629))
([db2f028](db2f028))
* improve mongodb duplicate checker
([#626](#626))
([bf277a9](bf277a9))
* **installer:** compound distro.like() on distribs like popos
([#653](#653))
([3687e1d](3687e1d))
* **installer:** ignore dev/post release from PyPI
([#634](#634))
([614c3e2](614c3e2))
* **installer:** secator update with correct package version
([#648](#648))
([a9cf189](a9cf189))
* lab --wait not in gitlab runner
([070ae84](070ae84))
* logic to test all tasks
([3bd7503](3bd7503))
* os.system return code
([02aed75](02aed75))
* progress type fields
([#652](#652))
([f146914](f146914))
* remove duplicates from txt exporter
([#630](#630))
([88ba5c5](88ba5c5))
* remove fping -r flag by default, show alive hosts better
([#665](#665))
([5c945fd](5c945fd))
* remove no-recreate flag in labs as not supported by github runner
([bd997a8](bd997a8))
* short opt incorrectly named
([#631](#631))
([0c73c60](0c73c60))
* tasks with no file flag need input_chunk_size=1
([#668](#668))
([a088c94](a088c94))
* tools in readme, arjun chunk and ffuf header
([#679](#679))
([654ff30](654ff30))
* tools table generator update
([9420f14](9420f14))
* update ci workflow
([f4c2b13](f4c2b13))
* update generate table workflow
([ff62702](ff62702))
* vulnerability output reference when unset
([#625](#625))
([a656fbf](a656fbf))


### Documentation

* generate tools table md
([#610](#610))
([d60f11e](d60f11e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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
0