The report command downloads a report of the most-recent scan of your FOSSA project. This command is usually run immedately after fossa analyze
or fossa test
The report type must be specified to successfully run, for example:
fossa report attribution
fossa report
supports the Common FOSSA Project Flags supported by all commands.
fossa report attribution
- A report that contains information about your dependencies and their authors. For more info about attributions, check the FOSSA docs page illustrating the topic.
By default, fossa report
waits a maximum of 3600 seconds (1 hour) for report contents. To override the default timeout, use, e.g.:
fossa report attribution --timeout 60
Where 60
is the maximum number of seconds to wait for the report to be downloaded.
fossa report
supports customizing the format used to render a report via the --format
flag.
Available options are:
json
markdown
spdx
text
For example, to render the report in JSON format, use fossa report attribution --format json
.
In earlier versions of the FOSSA CLI, the --json
flag was used to denote rendering the report in JSON format.
For backwards compatibility, this flag is still supported and takes precedence over the --format
flag if present.
However, it is deprecated, and should be replaced with --format json
to prevent future changes from breaking this behavior.
FOSSA supported a compatibility script that converts FOSSAv2 attribution report output to the same format as that in FOSSAv1.
This script was supported until the end of April 2022 and was included in the release assets, under the name compat-attribution
.
After April 2022, it's no longer supported, but can still be found on older releases, for example https://github.com/fossas/fossa-cli/releases/tag/v3.2.12.
We strongly recommend not trying to use this script, and instead migrating to the new report format.
To use this compatibility script:
- Download and extract
compat-attribution
for your platform to the same place as thefossa
binary. - Run
fossa report attribution --format json
, piping its output tocompat-attribution
. For example,fossa report attribution --format json | compat-attribution
- Parse the resulting output as you would have from FOSSAv1.
All fossa
commands support the following FOSSA-project-related flags:
Name | Short | Description |
---|---|---|
--project 'some project' |
-p |
Override the detected project name |
--revision 'some revision' |
-r |
-Override the detected project revision |
--fossa-api-key 'my-api-key' |
An alternative to using the FOSSA_API_KEY environment variable to specify a FOSSA API key |
|
--endpoint 'https://example.com' |
-e |
Override the FOSSA API server base URL |
--config /path/to/file |
-c |
Path to a configuration file including filename. By default we look for .fossa.yml in base working directory. |