Skip to content
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

feat(report): Add InstalledFiles field to Package #4706

Merged

Conversation

AliDatadog
Copy link
Contributor

Description

Associate to every package the list of files that are provided by this package for apk packages only.

Related issues

Related PRs

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

pkg/fanal/types/artifact.go Outdated Show resolved Hide resolved
pkg/fanal/types/artifact.go Outdated Show resolved Hide resolved
integration/testdata/alpine-310-registry.json.golden Outdated Show resolved Hide resolved
integration/testdata/conda-cyclonedx.json.golden Outdated Show resolved Hide resolved
integration/testdata/conda-spdx.json.golden Outdated Show resolved Hide resolved
pkg/fanal/analyzer/pkg/apk/apk.go Outdated Show resolved Hide resolved
pkg/fanal/analyzer/pkg/apk/apk.go Outdated Show resolved Hide resolved
pkg/fanal/analyzer/pkg/apk/apk_test.go Outdated Show resolved Hide resolved
@AliDatadog
Copy link
Contributor Author

Hi @knqyf263 , thank you for the review 🙇 I addressed the comments and applied the changes.

@AliDatadog AliDatadog requested a review from knqyf263 July 4, 2023 15:22
@AliDatadog
Copy link
Contributor Author

Hi @knqyf263 , small bump for this PR.

@AliDatadog
Copy link
Contributor Author

@knqyf263 would you have any update regarding this PR ?

pkg/fanal/types/artifact.go Outdated Show resolved Hide resolved
pkg/fanal/analyzer/pkg/apk/apk_test.go Outdated Show resolved Hide resolved
pkg/flag/scan_flags.go Outdated Show resolved Hide resolved
Comment on lines 99 to 94
patchSystemInstalledFiles(&pkg, []string{absPath}, opts)
installedFiles = append(installedFiles, absPath)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should merge these two values since SystemInstalledFiles is now just a collection of installed files for all packages. It doesn't make sense to have them differently. But we can refactor that after merging the PR.

@AliDatadog
Copy link
Contributor Author

@knqyf263 Any update ? 🙇

@knqyf263
Copy link
Collaborator

knqyf263 commented Oct 1, 2023

After careful consideration, I thought that --retain-pkg-installed-files may not be necessary, as installed files are not output by default without --list-all-pkgs. I am sorry that you went to the trouble of implementing this. Other than that, it looks good, and I will merge it right after removing --retain-pkg-installed-files.

@AliDatadog AliDatadog force-pushed the ali/add-system-installed-files-pkg branch 3 times, most recently from 7b2076f to 04ea18c Compare October 2, 2023 10:03
@AliDatadog AliDatadog changed the title feat(report): Add the option to keep system installed files for apk packages feat(report): Add InstalledFiles field to Package Oct 2, 2023
@AliDatadog AliDatadog force-pushed the ali/add-system-installed-files-pkg branch from 04ea18c to c37b529 Compare October 2, 2023 10:08
@AliDatadog
Copy link
Contributor Author

I changed the git history to add the co-author

Co-authored-by: Sylvain Baubeau <lebauce@gmail.com>
@AliDatadog AliDatadog force-pushed the ali/add-system-installed-files-pkg branch from c37b529 to a5ab437 Compare October 2, 2023 10:15
@knqyf263
Copy link
Collaborator

knqyf263 commented Oct 3, 2023

Tests are failing. Please let us know if you need any help.

@AliDatadog
Copy link
Contributor Author

AliDatadog commented Oct 6, 2023

Tests are failing. Please let us know if you need any help.

It appears that mage test:updateGolden is not updating the golden files as expected when I run the command. For info I have a mac m1 and have docker on my machine

@knqyf263
Copy link
Collaborator

It appears that mage test:updateGolden is not updating the golden files as expected when I run the command.

The build constraint excludes the file for macOS.

//go:build integration && linux

@knqyf263 knqyf263 added this pull request to the merge queue Oct 16, 2023
Merged via the queue into aquasecurity:main with commit 5b2b4ea Oct 16, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants