-
Notifications
You must be signed in to change notification settings - Fork 1
ci: add SonarCloud integration for code quality analysis #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: add SonarCloud integration for code quality analysis #14
Conversation
Co-authored-by: dev-parkins <6394929+dev-parkins@users.noreply.github.com>
|
@copilot Security hotspot related to using SHA as part of an action: Example: on line 17 of build.yml |
Co-authored-by: dev-parkins <6394929+dev-parkins@users.noreply.github.com>
... Updated both actions to use commit SHAs instead of version tags:
This ensures we're using reviewed code versions as per the security recommendation. Commit: will be in the next push. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Signed-off-by: dev-parkins <dev-parkins@users.noreply.github.com>
|
dev-parkins
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the SHA



Overview
This PR adds SonarCloud integration to the FerrisScript repository to enable automated code quality and security analysis on all pushes to the main branch and pull requests.
Changes Made
1. GitHub Actions Workflow (
.github/workflows/build.yml)Created a new workflow that runs SonarQube scans:
mainbranch and PR events (opened, synchronize, reopened)actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683(v4.2.2) pinned to commit SHASonarSource/sonarqube-scan-action@884b79409e164708f0bc668ba1c8e87935635d69(v6.0.0) pinned to commit SHAfetch-depth: 0for better analysis relevancy2. SonarCloud Configuration (
sonar-project.properties)Created the project configuration file with:
dev-parkins_FerrisScriptdev-parkinsBenefits
✅ Automated code quality checks on every PR
✅ Security vulnerability detection
✅ Code smell and bug identification
✅ Technical debt tracking
✅ Coverage analysis integration
✅ Secure workflow with pinned action versions
Setup Requirements
Before this workflow can run successfully, the repository owner needs to:
Configure the
SONAR_TOKENsecret:SONAR_TOKENVerify SonarCloud organization:
dev-parkinsorganization exists on sonarcloud.ioTesting
The workflow will automatically run on the next push to main or when a PR is created. Manual verification can be done by checking the Actions tab after merging this PR.
References
Implementation follows the official SonarCloud documentation for GitHub Actions integration:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.