Skip to content

Conversation

@ShocOne
Copy link
Member

@ShocOne ShocOne commented Apr 18, 2024

Change

Fixes for issues #164 , #163 , #162 and #161

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • My corresponding pipelines / checks run clean and green without any errors or warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (readme)
  • I did format my code

@ShocOne ShocOne merged commit a7c9a6d into main Apr 18, 2024

// Read the entire file
fileBytes, err := os.ReadFile(filePath)
fileBytes, err := os.ReadFile(absPath)

Check failure

Code scanning / gosec

Potential file inclusion via variable

Potential file inclusion via variable
// }

// Open the file if the path is deemed safe
return os.Open(absPath)

Check failure

Code scanning / gosec

Potential file inclusion via variable

Potential file inclusion via variable
for formField, filePath := range files {
file, err := helpers.SafeOpenFile(filePath)
if err != nil {
log.Error("Failed to open file securely", zap.String("file", filePath), zap.Error(err))

Check warning

Code scanning / gosec

Errors unhandled.

Errors unhandled.
for formField, filePath := range files {
file, err := helpers.SafeOpenFile(filePath)
if err != nil {
log.Error("Failed to open file securely", zap.String("file", filePath), zap.Error(err))

Check warning

Code scanning / gosec

Errors unhandled.

Errors unhandled.
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.

2 participants