-
Notifications
You must be signed in to change notification settings - Fork 186
[ANE-2616] Snippet Scan docs #1615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cfd041b to
130e4c0
Compare
csasarak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I mostly left questions.
One thing I'd like to see is if you could add this and some of its sections to the main manual ToC: https://github.com/fossas/fossa-cli/blob/master/docs/README.md
In lieu of an mdbook setup, I've been trying to keep a mostly flat list of topics for folks. It's hard to know what you don't know and that index is meant to help address that.
| fossa analyze --x-snippet-scan | ||
| ``` | ||
|
|
||
| Snippet Scanning must also be enabled for your organization, and is only available for enterprise customers. If you would like to enable it for your organization, please [contact us](https://support.fossa.com). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a simple way to verify that it is enabled? It may be good to describe that if so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that I can think of, unfortunately. I'm going to just leave this and maybe we can fix it if it turns out to be a problem in the future
docs/features/snippet-scanning.md
Outdated
| 4. **Filters Content**: By default, skips directories like `.git/`, and hidden directories. This includes, from `.fossa.yml`, `vendoredDependencies.licenseScanPathFilters.exclude`, documented further below. | ||
| 5. **Uploads Fingerprints**: Sends only the fingerprints to FOSSA's servers | ||
| 6. **Receives Matches**: Gets back information about any matching open source components | ||
| 7. **Uploads Match Contents**: For files that have matches, uploads source code content temporarily to FOSSA servers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you characterize temporarily a bit more? Is this optional? If I were a customer reading this I'd want more details since the idea that you're uploading source code could be a bit alarming.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see that you wrote about it more down below. Maybe reference that section here for people like me who freak out before reading the whole doc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Done!
|
|
||
| #### Custom Exclude Filtering | ||
|
|
||
| You can customize which files and directories are excluded from snippet scanning by configuring exclude filters in your `.fossa.yml` file. Note that snippet scanning currently only supports exclude patterns, not `only` patterns. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this last sentence meant to contrast snippet filtering with our currently existing ones?
|
|
||
| ## A note on scan times | ||
|
|
||
| The first time you run a snippet scan on a codebase, it may take a long time to scan. For example, scanning [Linux](https://github.com/torvalds/linux) for the first time takes around 60 minutes. This is because most of the files in your codebase will not exist in FOSSA's knowledge base, and we will need to fingerprint and compare all of them to our snippet scan corpus. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we recommend running an initial manual scan to "prime" before turning this on in CI?
I could see someone naively just turning this on in CI and having a ton of jobs (due to multiple simultaneous pushes/revisions) all start doing the full-scan. I think that'd be bad for Sparkle and also a poor experience for the customer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, maybe a future future version of this (if it's a problem at all) could use content to know if two scans are basically the same and then only let one of them proceed while the others just wait.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of recommending that they do an initial scan. I think this takes care of 99% of the problem, as those hypothetical parallel scans will then do almost no work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be worth communicating this to support as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's a good point. I'll mention it in the support and snippet scanning channel
Overview
Delivers ANE-2616
This PR updates the documentation for
fossa analyze --x-snippet-scandocs/references/subcommands/analyze.mdand intodocs/features/snippet-scanning.md. The subcommand documentation links to the feature documentation.Links to rendered files:
Acceptance criteria
Testing plan
This is mostly documentation, but I tested that the new link at the end of the snippet scan summary is correct.
Follow the testing plan for #1613. The link at the bottom of the snippet scan summary will look like this:
That link won't work right now, but it will once this is merged and on
master. So change the tag frommasterto116ab36adc153ea76745517092976da4cff92d14and check that it workshttps://github.com/fossas/fossa-cli/blob/cfd041bbcd7ad2126b7a83a95f4394bd4a093ba1/docs/features/snippet-scanning.md#the-snippet-scan-summary
Risks
Metrics
References
Checklist
docs/.docs/README.msand gave consideration to how discoverable or not my documentation is.Changelog.md. If this PR did not mark a release, I added my changes into an## Unreleasedsection at the top..fossa.ymlorfossa-deps.{json.yml}, I updateddocs/references/files/*.schema.jsonAND I have updated example files used byfossa initcommand. You may also need to update these if you have added/removed new dependency type (e.g.pip) or analysis target type (e.g.poetry).docs/references/subcommands/<subcommand>.md.