Skip to main content

Scanning

FossID scans in two ways:

  • Automatically, one file at a time, as you open, switch to or save a file, and when it changes on disk. This is on by default.
  • On demand, for the whole workspace, with FossID: Scan Workspace.

Automatic scanning​

A file is scanned when you:

  • open it;
  • switch to it, i.e. it becomes the active editor tab. This also covers files that were already open when the editor started;
  • save it;
  • change it on disk outside the editor, for example when a coding agent or another tool writes it. Files that git ignores aren't scanned this way, nor is a file that is open with unsaved changes. Save that file to scan it; VS Code first asks whether to overwrite the newer version on disk.

Opening and switching are cheap. If a file hasn't changed on disk since FossID last scanned it in this window, the earlier results are shown and no new scan runs. This only counts scans that reached your server: after a scan that couldn't reach it, the file is scanned again each time you open or switch to it. Saving re-scans the file.

When more than 25 files change on disk within 2 seconds, or after a git checkout, pull, merge or reset, FossID doesn't scan them automatically. The status bar then shows FossID: N changed files not scanned; click it to scan them.

Several quick events on the same file are combined into one scan. If you save a file while it is being scanned, FossID scans it again as soon as that scan finishes. If you open a file before you sign in, or while the scanner is still starting, FossID scans it as soon as the scanner is ready.

What a scan looks for​

Source files are checked for:

  • code that matches known open-source components, whole files or snippets;
  • license texts in the file itself, and whether they have been modified from the standard wording;
  • code snippets that match known-vulnerable upstream code.

Dependency manifests are resolved instead. FossID works out the version of every declared dependency and of the dependencies they pull in, then checks them for known vulnerabilities and for licenses your policy flags. It also checks the license the manifest declares for your own project, such as the license field in package.json, against your policy. The supported manifests are:

FileEcosystemDependencies checked
package.json, bower.jsonnpm and Bowerdependencies
Cargo.tomlRust / Cargo[dependencies] and [target.*.dependencies]
pom.xmlMaven<dependency> entries in the default compile scope
go.modGorequire entries, including // indirect
*.csprojNuGet<PackageReference> entries, except development-only ones (PrivateAssets="all" or DevelopmentDependency="true")
requirements.txtpiprequirement lines
pyproject.tomlPEP 621 / Poetry[project] dependencies and [tool.poetry.dependencies]
PipfilePipenv[packages]

Other sections, such as devDependencies, [dev-dependencies], <scope>test</scope> and [dev-packages], are not checked by default. Where FossID still resolves them, their dependencies show only the resolved version, in grey. See Dev dependencies for how to turn dev-only sections on.

File names must match exactly. Variants such as dev-requirements.txt, and lock files such as package-lock.json or Cargo.lock, are scanned as ordinary files, not as manifests.

Resolving a large manifest can take a minute or more. When a manifest is scanned as you open, save or rescan it, the setting fossid.scan.depResolveTimeoutSeconds (default 300 seconds) limits each resolution step.

Files that are never scanned automatically​

  • Files outside your workspace folders, and editors that aren't files on disk (diff views, output panels and similar).
  • Files larger than 10 MB.
  • FossID's own configuration: anything in a .fossid/ folder, plus .fossidignore, .fossidpolicy and fossidpolicy.
  • Editor and tool folders: .vscode/, .cursor/, .git/, and the file .mcp.json.
  • Anything you have excluded with .fossidignore (see Excluding files).

Turning automatic scanning off​

SettingDefaultEffect
fossid.autoScan.enabledonMaster switch. When off, opening, switching to or saving a file doesn't scan it; Scan Workspace and Rescan Current File still work.
fossid.autoScan.onOpenonScan when a file is opened.
fossid.autoScan.onFocusonScan when a file becomes the active editor.
fossid.autoScan.onSaveonScan when a file is saved.
fossid.autoScan.onDiskChangeonScan when a file changes on disk outside the editor. Not in untrusted workspaces.
fossid.autoScan.diskChangeBurstLimit25The most files FossID scans automatically when they change on disk at the same time.

The auto-scan status bar item​

A FossID item in the status bar shows the result of the most recent file scan. That may be a scan of another file than the one you're looking at, and the item doesn't change while you edit a file and its findings are removed:

TextMeaning
FossID (shield icon)Idle.
FossID scanning…A file scan is running.
FossID: cleanThe last scan found nothing.
FossID: N finding(s)The last scanned file has N findings that you haven't ignored. The number changes when you add or remove an ignore.
FossID: scan failedThe last scan couldn't finish. See Troubleshooting.

Clicking it runs FossID: Rescan Current File.

When the server can't be reached, FossID still checks the license texts in the file itself. Those that your policy prohibits or marks for review, and modified license texts, appear in the Problems panel, and the status bar shows their number; an approved license isn't shown. Findings from an earlier scan in this window are shown too. Ignored findings don't count. If there are none, or all of them are ignored, the status is FossID: scan failed, not FossID: clean, because nothing was checked against the server. FossID scans the file again the next time you open, switch to or save it.

Rescan Current File​

FossID: Rescan Current File scans the active file right away, ignoring any cached result.

  • If the file has unsaved changes, FossID saves it first.
  • If the file is excluded by .fossidignore, FossID scans it anyway and tells you so: FossID: <path> matches .fossidignore — scanning anyway; auto-scan skips this file. Use this to check an excluded file without removing the exclusion.

Scan Workspace​

FossID: Scan Workspace scans the whole workspace in one go: source files, plus dependency manifests. When looking for source files it skips hidden files and folders (names starting with .), files your .gitignore excludes, and files excluded in .fossidignore. Run it from the Command Palette, or from the … menu of the Policies view in the FossID side bar.

A progress notification shows each step. The steps are: connecting, clearing the previous results, loading the policy, scanning the project, resolving dependency manifests, enriching components, and publishing findings. The main FossID status bar item shows FossID: Scanning while it runs.

Things to know:

  • A trial doesn't include it. FossID shows Scan Workspace is available to FossID customers only. and doesn't scan. See Sign in with a trial key.
  • It replaces all current scan results, including scans your AI assistant ran in this window. FossID keeps the findings that your assistant added to the Problems panel itself.
  • It scans only the first folder in a multi-root workspace.
  • You can't cancel it once it starts. The setting fossid.scan.timeoutSeconds (default 1800 seconds, or 30 minutes) limits how long the project scan step may go without making progress. The timer restarts every time that step reports progress.
  • If it fails, FossID shows FossID scan failed with the cause, and offers Retry and View Details. The message says whether your previous findings are still there.

When the scan finishes, FossID offers Analyze Findings. This opens your AI chat with a prompt asking the assistant to audit the results, without scanning again. See Using FossID with AI assistants.

Scan Workspace Against Volume…​

If your organization has configured custom scan volumes, FossID: Scan Workspace Against Volume… checks the workspace against one of them. Unlike Scan Workspace, it doesn't clear your current results: it adds its findings to them. Under a company policy, the volumes offered are your organization's.

When results change without a new scan​

You don't always need a new scan to see updated findings. FossID re-evaluates the existing results immediately when you:

  • change the license policy or the detection rules;
  • your organization changes its company policy (FossID checks every 15 minutes and when you return to the window);
  • add, change or remove an ignore;
  • change .fossidignore. Findings for newly excluded files disappear right away.

While you edit​

As soon as you start typing in a file, FossID removes that file's findings, and in a manifest its dependency annotations. They would otherwise point at the wrong lines. Save the file, and FossID scans it again and shows fresh results. Undoing your changes back to the saved text doesn't bring the findings back. Switch to another tab and back, or run FossID: Rescan Current File.