-
Notifications
You must be signed in to change notification settings - Fork 73
Conversation
- Wrapped lib in a cli so you can still run it in that odd way Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
so we avoid storing on disk, but can go straight to memory Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Passing in logger instance everywhere... Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
move all collection functions into a seperate component to ease testing Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
easier testing and sharing of functions Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
this is work in progress, but does the basics Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
this makes it reusable and seperates resources use between runs and avoid thread spawning which is messy and slow Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
…n of undefined values
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
- 3rd party cookies and frames load randomly - browser did not close correctly, leading to memory leaks Signed-off-by: Per Ploug <[email protected]>
+ closing session correctly Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
@rriemann-eu - can you check if the behaivior is as expected - also, with the change to the flags, is the quite flag really needed? |
Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
@@ -155,6 +155,8 @@ async function createBrowserSession(browser_args, browser_logger) { | |||
waitUntil: "networkidle2", | |||
}); | |||
|
|||
await page.waitForNetworkIdle(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why this is necessary on top of waitUntil
option employed before.
https://pptr.dev/#?product=Puppeteer&version=v2.1.1&show=api-pagegotourl-options
Also, I did not find the method waitForNetworkIdle()
in this docs at https://pptr.dev .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I'm actually not entirely sure this is necessary, but it was given us more stable test results, we saw inconsistent number of 3rd party cookies loaded when using youtube videos via an iframe for instance, adding this, gave some more stability.
I believe the problem is that puppeteer does not always know when all frame elements are loaded and closes the connection before the last cookies might have been set.
I have already moved the log output to STDERR so that people can distinguish output from In order to quickly merge to master, we can go forward without I wait for some feedback regarding possible breaks with existing tooling and afterwards merge to master. I would then give a bit time for testing and release a new version few weeks later. :) |
…-collector Signed-off-by: Per Ploug <[email protected]>
Signed-off-by: Per Ploug <[email protected]>
let uri_ins_https = new url.URL(uri); | ||
uri_ins_https.protocol = "https:"; | ||
|
||
let testsslExecutable = args.testsslExecutable || "testssl.sh"; // set default location |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the impression this default value is never used, as an untrue value is already tested in line 10.
So with --testssl
only, the entire function is skipped as far as I see. I'll try to look into this during the weekend or early next week. I hope we can merge to master afterwards. :)
This was the the old behaviour
This fix brings back the old behaviour.
Dear @perploug , I started fixing the failing tests from
Could you please have a look? 🙂 |
- makes discarding of browser session depending on a session being defined -adds a seperate test to check for page session - page session should not be discarded as it is output expected for later user - tests updated to reflect this - made end 2 end tests more robust and not depending on a changing externally dependant number
@rriemann tests should pass now |
This is a major refactor of the codebase to follow better practices, enable unit testing and using the evidence collector as an API rather than a standalone application.
This version is currently used in a production setup and should provide the same results as the current code base
Unit testing is only partially done, but can be improved over time to increase coverage