-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(scan): resolve detection of the first endpoint in the initiate sc…
…an task (#238) * fix(scan): resolve detection of the first endpoint in the initiate scan task - Replace HTTPx first scan by nmap, then launch HTTPx with discovered port - Create a reusable function to launch nmap on the fly - Add parsing to get ports and services from Nmap output - Add more logs to debug scans while running - Remove the HTTP CRAWL global var, Nmap is the default to retrieve the first endpoint (the starting point for all the others tasks) - Adjust the is_alive parameter for tasks that need alive endpoints - Fix S3 scanner source file not found - Add more checks to prevent errors and scan crash - Refactor Endpoint saving for a better logic and less errors - Improve URLs validation * fix: prevent race condition on save & add retry attempt on nmap scan * refactor: extract first endpoint creation logic from initiate_scan method - Extract first endpoint creation logic from initiate_scan to simplify it - Improve logging for debug - Add/remove logs for production * fix(tests): remove loops in tests as recommended by sourcery * fix(security): Uncontrolled data used in path expression - Dedicated class/methods created for this purpose - Sanitize domain name to prevent dangerous chars - Full path normalization - Verify that final path is within the base folder - Explicit permissions defined - Manage errors with explicit message * fix: remove unused vars * fix: remove nmap custom exception
- Loading branch information
Showing
10 changed files
with
879 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.