Safeguard
Security Guides•

How do you test if your scanner finds a vendored library?

A 15 minute test to learn whether your scanner detects a copied library with no manifest entry, using an old jQuery file as the canary.

Safeguard Security Team
3 min read

Copy a known old release of a library into a throwaway repository as a plain file, with no manifest entry, and scan it. If your scanner reports it, it can fingerprint vendored code. If not, copied files are a blind spot you need to cover another way.

Why vendored code is the hard case

Manifest scanning works from declarations. A file dropped into a vendor or static folder has no declaration. Detecting it needs file hashing, header comment matching or binary analysis, which not every scanner does. Related background is in copied code and your SBOM.

Choose the canary

jQuery is a good candidate because its own release notes document a security fix. The jQuery 3.5.0 release post, dated 10 April 2020, describes an issue in jQuery.htmlPrefilter that could introduce a cross site scripting vulnerability, and says the HTML parser in jQuery 3.4.1 and earlier had edge cases with unintended consequences. So a copy of a pre 3.5.0 file is a sensible canary.

The 15 minute test

  1. Create a private repository with a single folder named static.
  2. Download an older jQuery release file from the official jQuery site or its archive, for example version 3.4.1, and save it into static.
  3. Do not add a package.json. The point is that nothing declares it.
  4. Run your scanner exactly as your pipeline does.
  5. Check the findings for jQuery and its advisory.
  6. Now rename the file to lib.js and scan again. Fingerprinting by filename fails here, while hash or content matching still works.
  7. Minify or concatenate it into a bundle if your build does that, and scan once more.

Reading the three runs

RunDetectedWhat it tells you
Original filenameYes or noFilename matching at least
Renamed fileYes or noContent or hash matching
Inside a bundleYes or noDepth of analysis

A tool that passes only the first run relies on filenames. A tool that passes all three can see vendored code in realistic conditions.

If it fails

  1. Convert vendored files into declared dependencies wherever possible.
  2. For the rest, keep a third party inventory with name, version and source, and feed it into your SBOM.
  3. Add a check in review that new files under vendor folders come with an inventory entry.
  4. Note the limitation in your coverage statement.

See also exceptions for vendored or forked code you do not own.

Safeguard offers SBOM and dependency scanning and a free scan at gold.safeguard.sh/scan. Whatever you use, run the three file test.

Quick check

Why not just trust the scanner vendor's coverage claim?

Claims describe typical cases. A test on your own file layout shows what happens in your repositories.

Does a missed vendored file mean the library is vulnerable?

Not necessarily. It means the scanner cannot tell, so you must determine the version yourself.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.