Feature/intercom token detection#4
Merged
Merged
Conversation
- Fix auth0 token test data to match regex pattern requirements - Update TestGetRelativePathError to TestGetRelativePathUnrelatedDirs to reflect actual filepath.Rel behavior for unrelated directories
- Implement GitHubReporter that outputs findings as GitHub Actions workflow commands (::error, ::warning, ::notice) - Map severity levels to appropriate annotation types - Return error when findings exist to fail the workflow
- Add ExitCode field to Config struct with default value of 1 - Update reporters to return errors instead of calling os.Exit directly - Use configured exit code in main.go when findings are found
- Implement ASTDetector that uses go/ast and go/parser - Detect dangerous function calls and hardcoded credentials - Only analyze .go files, skip unparseable files
- Implement ScanCache for storing and retrieving scan results - Cache results based on file hash and modification time - Integrate cache into Scanner for incremental scanning - Skip unchanged files during subsequent scans
- Implement CustomRuleDetector for user-defined rules - Add CustomRuleFiles config option for specifying rule files - Support regex patterns, custom severity, and messages - Load rules from YAML files at startup
- Add ASTDetector tests for dangerous functions and credentials - Add CustomRuleDetector tests for YAML rule loading - Add SummaryReporter tests for statistics output
- Test cache hit/miss behavior - Test disabled cache - Test cache clear - Test modified file detection - Test cache statistics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Describe the changes in this PR.
Which detectors does it affect?
Testing done
Checklist
Screenshots (if applicable)
Add screenshots to help explain your changes.