Skip to content
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

Add tests and print out graphs on redirects #27

Merged
merged 5 commits into from
Aug 24, 2023
Merged

Add tests and print out graphs on redirects #27

merged 5 commits into from
Aug 24, 2023

Conversation

ShivanKaul
Copy link
Collaborator

@ShivanKaul ShivanKaul commented Aug 22, 2023

Tests

Finally add integration tests. Local for now.

Redirection

Check if it's a redirect navigation, save the URL, stop the current load and generate a PG file. Then, load the redirect URL (rinse, repeat).

@socket-security
Copy link

socket-security bot commented Aug 22, 2023

function writeToFile (args: CrawlArgs, url: Url, response: any, logger: Logger) {
const outputFilename = pathLib.join(
args.outputPath,
createFilename(url)

Choose a reason for hiding this comment

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

reported by reviewdog 🐶
[semgrep] Detected possible user input going into a path.join or path.resolve function. This could possibly lead to a path traversal vulnerability, where the attacker can access arbitrary files stored in the file system. Instead, be sure to sanitize or validate user input first.

Source: https://semgrep.dev/r/javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal


Cc @thypon @bcaller

test/config.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@pes10k pes10k left a comment

Choose a reason for hiding this comment

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

lgtm

@ShivanKaul
Copy link
Collaborator Author

Removing security label after discussion with @fmarier. The input for this tool is always us providing a URL, binary and the other parameters.

@ShivanKaul ShivanKaul merged commit 756ffe8 into main Aug 24, 2023
2 checks passed
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.

5 participants