Skip to content

Feature/security scanner enhancements#1

Merged
StephenJarso merged 24 commits into
mainfrom
feature/security-scanner-enhancements
Jun 13, 2026
Merged

Feature/security scanner enhancements#1
StephenJarso merged 24 commits into
mainfrom
feature/security-scanner-enhancements

Conversation

@StephenJarso

Copy link
Copy Markdown
Owner

What does this PR do?

Describe the changes in this PR.

Which detectors does it affect?

  • Secrets
  • Environment
  • Auth
  • Config
  • New detector: _______

Testing done

  • Unit tests added
  • Manually tested with a real codebase
  • All existing tests pass

Checklist

  • Code follows the style guide
  • Self-review completed
  • Documentation updated (if applicable)
  • CHANGELOG.md updated under [Unreleased]

Screenshots (if applicable)

Add screenshots to help explain your changes.

- Change module name from github.com/stephenjarso/secure-push to secure-push
- Update golang.org/x/sync to v0.5.0 for Go 1.22 compatibility
- Add basic Finding struct for future use
- Prevent compilation errors from empty file
- Add basic package documentation
- Prevent compilation errors from empty file
- Add basic package documentation
- Prevent compilation errors from empty file
- Fix IsBinaryFile to handle files smaller than 512 bytes
- Return correct number of bytes read to avoid false positives
- Remove unused min function
- Remove unused map that was causing compilation warning
- Clean up code to pass linter checks
- Add SeverityThreshold, IgnoreRules, IgnorePaths, Allowlist, CustomRules fields
- Use detectors.Severity type for consistency
- Add matchPath helper function for better path matching
- Handle non-existent config files gracefully
- Update test cases to use new field names (SeverityThreshold, IgnorePaths)
- Fix test expectations for severity filtering
- Add detectors import for Severity type
- Convert configFilenames map keys to lowercase
- Ensure consistent matching with strings.ToLower in Detect function
- Update empty filename test to expect 0 findings
- Empty filename should not match any config file pattern
- Update TestIntegrationScanWithEnvFiles to expect 1 finding
- EnvDetector only detects .env file, not secrets within
- Update TestIntegrationScanWithSeverityFilter to use SeverityThreshold field
- Add subcommand support: scan, pre-commit, install, version, help
- Add runPreCommit function to scan staged files
- Add runInstall function to install git pre-commit hook
- Add getStagedFiles placeholder for git integration
- Improve usage output with command examples
- Add MaxConcurrentFiles constant for concurrency limit
- Add DefaultWorkerCount for worker pool configuration
- Document parallel scanning utilities
- Add tests for all log levels: Debug, Info, Warn, Error
- Add tests for log level filtering
- Add tests for custom output writer support
- Add tests for ConsoleReporter, JSONReporter, and GitHubReporter
- Test output format and error handling
- Add tests for WalkDir, GetFileSize, FileExists, IsDir
- Add tests for GetRelativePath and ValidatePath
- Test error handling for edge cases
- Add tests for IsBinaryFile, IsBinary, GetFileExtension, IsTextFile
- Test edge cases: small files, large files, files in subdirectories
- Test error handling for nonexistent files
- Add all built-in detectors to the reference table
- Add detector best practices section
- Improve documentation formatting and examples
- Add max_file_size, enable_detectors, disable_detectors options
- Add common configuration patterns section
- Improve documentation structure and examples
- Add CSVReporter struct for CSV output format
- Add NewCSVReporter constructor function
- Output findings with Rule, Severity, File, Line, Message columns
@StephenJarso StephenJarso merged commit 9bf94b7 into main Jun 13, 2026
2 of 4 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.

1 participant