Skip to content

Add test to aggregate external javascript files

This test would find any externally loaded javascript files, e.g.

document.querySelectorAll("script[src^=https]").forEach(s => console.log(s.src))

These files would be downloaded and saved in an external scripts directory that can be archived. The test itself would not have pass/fail per se, but would be used to download these files so they can be scanned as part of a subsequent dependency scan. Local files are skipped since they should already be included in the codebase and scanned.

The benefit of doing this as a browser-based test is it only downloading what's ultimately sent to the browser, and eliminates the need to scan various different file types, how to managed scripts injected by code, etc.

Edited by Aaron Goldenthal
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information