fossa-cli
fossa-cli copied to clipboard
[untested]: Make walker resilient to dir access errors
Overview
When the discovery traverses the file tree, it crashes if there are any errors reading the directory, or executing the directory handler.
This PR only addresses the read errors, since handler errors could be valid.
Acceptance criteria
Walker is resilient to errors during the listdir operation.
Testing plan
TBD
Risks
We lose information here, since we can't log the directories that failed (too noisy to do it for every discovery).
References
Internal slack thread: https://teamfossa.slack.com/archives/C0155DTGWB1/p1655439461261949
Checklist
- [ ] I added tests for this PR's change (or explained in the PR description why tests don't make sense).
- [ ] If this PR introduced a user-visible change, I added documentation into
docs/. - [ ] If this change is externally visible, I updated
Changelog.md. If this PR did not mark a release, I added my changes into an# Unreleasedsection at the top. - [ ] If I made changes to
.fossa.ymlorfossa-deps.{json.yml}, I updateddocs/references/files/*.schema.json. 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).
resilient-walk