fossas / fossa-cli

Fast, portable and reliable dependency analysis for any codebase. Supports license & vulnerability scanning for large monoliths. Language-agnostic; integrates with 20+ build systems.
https://fossa.com
Other
1.28k stars 173 forks source link

Don't die on no VSI dependencies #1373

Closed jssblck closed 9 months ago

jssblck commented 9 months ago

Overview

No longer error when VSI finds no dependencies.

Acceptance criteria

Testing plan

I created a project that would find no dependencies:

mkdir -p ~/projects/scratch/empty
touch ~/projects/scratch/empty/nothing.c

I then ran a VSI scan against that project with these changes:

cabal run fossa -- analyze ~/projects/scratch/empty -p vsi-empty --detect-vendored
Unable to infer project revision from VCS, using current timestamp as the revision.
Running VSI analysis
Created Scan ID: a1b96f6e-93f3-4acc-8a65-416abf1bd8da
Finalizing scan
Waiting for cloud analysis

Scan Summary
------------
fossa-cli version 3.8.34 (revision b78c3ba13e53 compiled with ghc-9.4)
fossa endpoint server version: 4.16.43

1 projects scanned;  0 skipped,  1 succeeded,  0 failed,  0 analysis warnings

-
* vsi analysis: succeeded
  ** /Users/jessica/projects/scratch/empty/

  Some projects may not appear in the summary if they were filtered during discovery.
  You can run `fossa list-targets` to see all discoverable projects.

You can pass `--debug` option to eagerly show all warning and failure messages.
You can also view analysis summary with warning and error messages at: "/private/var/folders/q7/3nvvpy0d6js28m8lypw3tcx80000gn/T/fossa-analyze-scan-summary.txt"
------------

Using project name: `vsi-empty`
Using revision: `2024-02-02T23:43:56Z`
Using branch: `No branch (detached HEAD)`
============================================================

    View FOSSA Report:
    https://app.fossa.com/projects/custom%2b24357%2fvsi-empty/refs/branch/master/2024-02-02T23:43:56Z

============================================================

I also ran one before making the changes and it errored as expected.

Risks

Theoretically someone might be depending on this old workflow but I seriously doubt it.

Metrics

None

References

https://teamfossa.slack.com/archives/C039KE5ERNE/p1706913911829629

Checklist