Skip to content

Conversation

@mattdot
Copy link
Member

@mattdot mattdot commented Apr 11, 2025

This pull request includes several changes aimed at improving file hashing, adding commit message instructions, and enhancing testing. The most important changes are grouped into improvements to file hashing, commit message instructions, and testing.

Improvements to file hashing:

  • internal/helpers/hash.go: Added checks to ensure the file is a regular file and not a symbolic link before attempting to calculate its SHA256 hash.

Commit message instructions:

Testing enhancements:

Additionally, a change log entry was added to document the improvement in file hashing:

@mattdot mattdot self-assigned this Apr 11, 2025
@mattdot mattdot marked this pull request as ready for review April 11, 2025 18:58
Copilot AI review requested due to automatic review settings April 11, 2025 18:58
@mattdot mattdot enabled auto-merge (squash) April 11, 2025 18:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • .vscode/settings.json: Language not supported
Comments suppressed due to low confidence (2)

internal/helpers/hash.go:29

  • [nitpick] Consider updating the error message to explicitly mention that symbolic links are not supported, so the user understands why the file is rejected.
if !fileInfo.Mode().IsRegular() {

internal/helpers/hash.go:25

  • Ensure that the 'fmt' package is imported in this file since the error formatting relies on fmt.Errorf.
return "", fmt.Errorf("failed to stat file '%s': %w", filePath, err)

@mattdot mattdot linked an issue Apr 14, 2025 that may be closed by this pull request
@mattdot mattdot merged commit 86cd2cb into main Apr 23, 2025
18 checks passed
@mattdot mattdot deleted the fuzzing branch April 23, 2025 08:59
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.

CalculateSHA256 should check if a file is a real file

3 participants