Run semgrep scan with community edition on every PR#22
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds automated security scanning using Semgrep Community Edition to run on every pull request. The implementation includes custom security rules for React Native mobile development and integrates with GitHub Actions workflow.
- Introduces comprehensive Semgrep security rules covering JavaScript/TypeScript, Java Android, Objective-C iOS, and general cross-platform vulnerabilities
- Adds GitHub Actions workflow to automatically run Semgrep scans on PRs and master branch pushes
- Configures file inclusion/exclusion patterns to focus scanning on relevant source code files
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .semgrep_scan_rules.yml | Defines custom security rules for detecting hardcoded secrets, unsafe practices, and platform-specific vulnerabilities |
| .github/workflows/semgrep_scan.yml | GitHub Actions workflow configuration to run Semgrep scans automatically on PRs |
Comments suppressed due to low confidence (1)
.github/workflows/semgrep_scan.yml:1
- The workflow name 'Build TS' is misleading as this workflow performs security scanning with Semgrep, not TypeScript building. Consider renaming to 'Semgrep Security Scan' or similar.
name: Build TS
| - pattern: | | ||
| maven { url 'http://...' } | ||
| message: "HTTP repository URL found - use HTTPS for security" | ||
| languages: [gradle] |
There was a problem hiding this comment.
The language 'gradle' is not a valid Semgrep language identifier. Gradle files should use 'generic' or be handled through file patterns. Consider using 'generic' language or removing this rule if not supported.
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
Replace SonarCloud with Semgrep Security Scanning
This PR migrates the project's security scanning from SonarCloud to Semgrep Community Edition, providing comprehensive security analysis for React Native applications.
Changes Made
build_ts.yml) that was running SonarCloud scans on push/PR eventssemgrep_scan.yml) with:.semgrep_scan_rules.yml) covering:Benefits
Testing
The workflow will run automatically on this PR to validate the Semgrep configuration and rules.
--
hee hee