-
Notifications
You must be signed in to change notification settings - Fork 587
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
CLI flag for directory base #1867
Conversation
Signed-off-by: Avi Deitcher <[email protected]>
Clean CI always is nice 😁 |
How can I help move this along @kzantow ? |
…redundant functions Signed-off-by: Keith Zantow <[email protected]>
Huzzah! |
So it is just Is this going into a release version? |
@deitch yes either |
Sure. Can I bother you to comment here when it is in? I will start to adopt it upstream in various places then. |
* main: feat: CLI flag for directory base (#1867) Fix CPE gen for k8s python client (#1921) chore: update iterations to protect against race (#1927) chore(deps): update bootstrap tools to latest versions (#1922) fix: Don't use the actual redis or grpc CPEs for gems (#1926) fix(install): return with right error code (#1915) Remove erroneous Java CPEs from generation (#1918) chore(deps): bump golang.org/x/net from 0.11.0 to 0.12.0 (#1916) Switch UI to bubbletea (#1888) fix: use filepath.EvalSymlinks if os.Readlink fails to evaluate the link (#1884) add file source digest support (#1914) chore(deps): update bootstrap tools to latest versions (#1908) chore(deps): bump golang.org/x/mod from 0.11.0 to 0.12.0 (#1912) chore(deps): bump golang.org/x/term from 0.9.0 to 0.10.0 (#1913) doc(readme): add installation section with scoop (#1909) Refactor source API (#1846) chore(deps): update bootstrap tools to latest versions (#1905)
@deitch this has made it into a release: https://github.com/anchore/syft/releases/tag/v0.85.0 |
Shouldn't the base-path default to I solved a CI problem (that occured as of the latest FYI we are scanning a temp directory with symlinks to |
@CLechleitner42 could you open an issue for this? Symlinks are hard. We probably need a broader discussion to change the behavior -- but absolutely can if it's determined to be the right thing to do! |
OK, I'll create an issue shortly, first I have to make sure our CI is fixed, it blocks a major project's acceptance ;-) Yes symlinks are not trivial to handle once you start to think about link symlinks to symlinks, loops, and so on. PS: Thanks for the quick reaction! |
Signed-off-by: Avi Deitcher <[email protected]> Signed-off-by: Keith Zantow <[email protected]> Co-authored-by: Keith Zantow <[email protected]>
The ability to add a "root" or "base" directory already exists. However, it only was exposed via API and not CLI.
This adds a flag called
--base-path <base>
which would use that as the root. Defaults to""
.In order to wire it up into
Source
, and specifically the wholeParseInput*()
without adding even more variants, I rewired them to just take variadic options funcs, and created the funcs for the ones we know exist. I recognize that this looks good to me, but may be a little off the wall for others. I am more than happy to take redirection on it.I thought about doing the same in
source.go
withNewFromDirectoryWithName()
andNewFromDirectoryRootWithName()
andNewFromDirectoryWithNameVersion()
and etc. etc. But that already had the*Root*
variants, so I left it alone. I can add it, if wanted.Either way, this does work.