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

docs(image): fix the comment on the soft/hard link #4740

Merged
merged 3 commits into from
Jul 6, 2023

Conversation

zunlongzhou
Copy link
Contributor

@zunlongzhou zunlongzhou commented Jun 30, 2023

The comment before the following w.processFile(filePath, tr, hdr.FileInfo(), analyzeFn) call says: // A symbolic/hard link or regular file will reach here. (pkg/fanal/walker/tar.go)
But defualt's processing causes the symbolic/hard link to not reach the processFile function location

Description

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).

The comment before the following w.processFile(filePath, tr, hdr.FileInfo(), analyzeFn) call says: // A symbolic/hard link or regular file will reach here. 
But defualt's processing causes the symbolic/hard link to not reach the processFile function location
@CLAassistant
Copy link

CLAassistant commented Jun 30, 2023

CLA assistant check
All committers have signed the CLA.

@zunlongzhou zunlongzhou changed the title Update tar.go fix(tar.go): Solve the soft link can not enter the processing function problem Jun 30, 2023
@zunlongzhou zunlongzhou changed the title fix(tar.go): Solve the soft link can not enter the processing function problem fix(image): Solve the soft link can not enter the processing function problem Jun 30, 2023
@knqyf263
Copy link
Collaborator

knqyf263 commented Jul 2, 2023

Thanks. The source code is correct, and the comment is wrong. Could you update the comment?

We need more discussion on the pros/cons of following symlinks.
#4505

update tar.go comment
@zunlongzhou
Copy link
Contributor Author

Thank you, I understand. I have updated the comments.

@knqyf263
Copy link
Collaborator

knqyf263 commented Jul 2, 2023

Integration tests are failing due to a different reason. I'll fix it.

@knqyf263 knqyf263 enabled auto-merge July 2, 2023 12:27
@knqyf263 knqyf263 changed the title fix(image): Solve the soft link can not enter the processing function problem docs(image): fix the comment on the soft/hard link Jul 6, 2023
@knqyf263 knqyf263 added this pull request to the merge queue Jul 6, 2023
Merged via the queue into aquasecurity:main with commit 3c16ca8 Jul 6, 2023
13 checks passed
AnaisUrlichs pushed a commit to AnaisUrlichs/trivy that referenced this pull request Aug 10, 2023
* Update tar.go

The comment before the following w.processFile(filePath, tr, hdr.FileInfo(), analyzeFn) call says: // A symbolic/hard link or regular file will reach here. 
But defualt's processing causes the symbolic/hard link to not reach the processFile function location

* Update tar.go

update tar.go comment

---------

Co-authored-by: knqyf263 <knqyf263@gmail.com>
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.

None yet

3 participants