Pipeline Security Hardening#817
Draft
Schmarvinius wants to merge 9 commits intomainfrom
Draft
Conversation
Contributor
There was a problem hiding this comment.
This PR makes good security improvements — pinning all GitHub Actions to full commit SHAs, moving permissions to the job level with least-privilege defaults, and replacing the Piper abstraction layer with direct tool invocations. The main issues to address are: the SonarQube token being interpolated directly into the shell command line (a secret exposure risk), the removal of include-hidden-files: true from the release artifact uploads (which may break downstream jobs), and the unauthenticated remote script execution in the BlackDuck step.
PR Bot Information
Version: 1.20.37
- Correlation ID:
682ae9d7-451b-4e5a-a603-5f1617ab08a3 - Event Trigger:
pull_request.opened - LLM:
anthropic--claude-4.6-sonnet - File Content Strategy: Full file content
- Agent Instructions:
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.
Pipeline Security Hardening: Pin GitHub Actions to Commit SHAs and Remove Piper Dependencies
Chore
🔒 Security Hardening: Pins all GitHub Actions to specific commit SHAs instead of mutable version tags, removes the
SAP/project-piper-actiondependency, replaces it with direct tool invocations, and enforces minimal permissions across all workflows.Changes
.github/actions/build/action.yml: Pinsactions/setup-javaandstCarolas/setup-mavento commit SHAs. Replaces theSAP/project-piper-actionMaven build step with a directmvn clean installcommand..github/actions/deploy-release/action.yml: Pinsactions/setup-javaandstCarolas/setup-mavento commit SHAs. Removes the debug "Echo Inputs" step that printed sensitive values..github/actions/integration-tests/action.yml: Pinsactions/setup-javaandstCarolas/setup-mavento commit SHAs..github/actions/newrelease/action.yml: Pinsactions/setup-javaandstCarolas/setup-mavento commit SHAs..github/actions/scan-with-blackduck/action.yml: Pins action dependencies to SHAs. Replaces theSAP/project-piper-actionBlackDuck step with a directdetect9.shscript invocation using explicit, scoped environment variables instead ofsecrets: inherit..github/actions/scan-with-sonar/action.yml: Pins action dependencies to SHAs. Replaces theSAP/project-piper-actionSonarQube step with a directmvn sonar-maven-plugin:sonarinvocation. Removes debugPrint Revisionstep..github/actions/test-sample/action.yml: Addsjava-versionandmaven-versioninputs. Pinsactions/setup-java(upgraded from v4 to v5 SHA) andstCarolas/setup-mavento commit SHAs..github/dependabot.yml: Addsopen-pull-requests-limit: 5for GitHub Actions updates..github/workflows/issue.yml,prevent-issue-labeling.yml,stale.yml: Moves permissions from workflow level to job level (permissions: {}at top, specific grants per job)..github/workflows/main.yml,pipeline.yml,pr.yml,release.yml: Addspermissions: read-allat the workflow level. Pins allactions/checkout,actions/upload-artifact,actions/download-artifact, andgithub/codeql-actionsteps to commit SHAs. Replacessecrets: inheritwith explicit, enumerated secret passing. Removes thedeploy-snapshotjob/input from the reusable pipeline..pipeline/config.yml: Removed entirely as the Piper configuration is no longer needed.PR Bot Information
Version:
1.20.37682ae9d7-451b-4e5a-a603-5f1617ab08a3pull_request.openedanthropic--claude-4.6-sonnet