[kattu-370]Update Sonar Analysis step in workflow - #372
Conversation
Signed-off-by: Mahesh-Binayak <76687012+Mahesh-Binayak@users.noreply.github.com>
WalkthroughThe SonarCloud GitHub Actions step was renamed and its Maven command was updated to use the ChangesSonarCloud workflow
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/maven-sonar-analysis-new.yml:
- Line 65: Update the Maven command’s directory selection to use the GitHub
Actions fallback expression `${{ inputs.SERVICE_LOCATION || '.' }}` instead of
the raw `inputs.SERVICE_LOCATION`, preserving the intended current-directory
behavior when the service location is empty.
- Around line 62-65: Prevent shell injection in the workflow command by passing
SERVICE_LOCATION and SONAR_URL through the step’s env block instead of
interpolating them directly into run. Update the SERVICE_KEY and cd logic to use
the environment variable with strict quoting, and validate that the service path
is relative, contains no traversal or shell metacharacters, and resolves within
the workspace before changing directories. Use the environment-backed SONAR_URL
in the Maven arguments, preserving the existing project-key and token behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 099575b0-602e-4222-bc70-57d42f4d78a8
📒 Files selected for processing (1)
.github/workflows/maven-sonar-analysis-new.yml
Summary by CodeRabbit