Skip to content

security: harden release workflow and declare workflow_call secrets#487

Merged
cx-luis-ventuzelos merged 4 commits into
mainfrom
fix/workflow-security-hardening
Jun 22, 2026
Merged

security: harden release workflow and declare workflow_call secrets#487
cx-luis-ventuzelos merged 4 commits into
mainfrom
fix/workflow-security-hardening

Conversation

@cx-luis-ventuzelos

@cx-luis-ventuzelos cx-luis-ventuzelos commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace actions/checkout v4.3.1 → v6.0.3 and switch from PERSONAL_ACCESS_TOKEN to GITHUB_TOKEN
  • Fix script injection in Download CLI, Tag, Update POM, Build artifactId, and Publish steps by moving inputs.* context expressions to env vars
  • Replace deprecated ::set-output with $GITHUB_OUTPUT in Tag step
  • Update actions/setup-java v4.3.0 → v5.2.0
  • Add explicit secrets: declaration under workflow_call (MAVEN_GPG_PASSPHRASE, MAVEN_GPG_PRIVATE_KEY, OSSRH_TOKEN, OSSRH_USERNAME)
  • Fix broken shell conditional in Build artifactId property step

Closes #484, closes #486.

@stepsecurity-app

Copy link
Copy Markdown
Contributor

Security Policy Alert: Actions Policy Violation

This workflow run has been blocked by StepSecurity's actions policy.

Disallowed Actions:

  • timonvs/pr-labeler-action@f9c084306ce8b3f488a8f3ee1ccedc6da131d1af

To fix this issue, please modify the workflow to use only allowed actions. Contact your organization administrator to request changes to the allowed actions list if needed.

For more information, see StepSecurity's Actions Policy documentation.

@stepsecurity-app

Copy link
Copy Markdown
Contributor

Security Policy Alert: Secret Policy Violation

This workflow run has been blocked by StepSecurity's secrets policy because it accesses secrets and the workflow file differs from the default branch.

Secret references detected:

  • secrets.GITHUB_TOKEN at line 17
  • secrets.CX_CLIENT_ID at line 62
  • secrets.CX_CLIENT_SECRET at line 63
  • secrets.CX_BASE_URI at line 64
  • secrets.CX_TENANT at line 65
  • secrets.CX_APIKEY at line 66

To approve this workflow, please add the workflows-approved label to this PR.

Note: The label must be added by someone other than the PR author (cx-luis-ventuzelos) or automation bots to ensure proper security review.

After the label is added, you can re-run the blocked workflow to proceed.

This workflow will be automatically approved once merged into the default branch.

For more information, see StepSecurity's Secret Exfiltration Policy documentation.

@cx-anurag-dalke cx-anurag-dalke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

- Replace actions/checkout v4.3.1 with v6.0.3 and switch from PERSONAL_ACCESS_TOKEN to GITHUB_TOKEN
- Fix script injection in Download CLI, Tag, Update POM, Build artifactId, and Publish steps by moving inputs to env vars
- Replace deprecated ::set-output with $GITHUB_OUTPUT in Tag step
- Update actions/setup-java v4.3.0 to v5.2.0
- Add explicit secrets declaration for workflow_call (MAVEN_GPG_PASSPHRASE, MAVEN_GPG_PRIVATE_KEY, OSSRH_TOKEN, OSSRH_USERNAME)
- Fix broken shell conditional in Build artifactId property step
@cx-luis-ventuzelos
cx-luis-ventuzelos force-pushed the fix/workflow-security-hardening branch from 71bfedb to 7e0901c Compare June 22, 2026 11:02

@cx-anurag-dalke cx-anurag-dalke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@cx-luis-ventuzelos
cx-luis-ventuzelos merged commit 06dafaa into main Jun 22, 2026
2 of 4 checks passed
cx-atish-jadhav added a commit that referenced this pull request Jul 13, 2026
commit 8e107dc
Author: Atish Jadhav <atish.jadhav@checkmarx.com>
Date:   Tue Jun 23 19:34:27 2026 +0530

    security: fix SCA vulnerability for JUnit (#488)

    Co-authored-by: Luís Ventuzelos <207163323+cx-luis-ventuzelos@users.noreply.github.com>

commit 06dafaa
Author: Luís Ventuzelos <207163323+cx-luis-ventuzelos@users.noreply.github.com>
Date:   Mon Jun 22 12:37:18 2026 +0100

    security: harden release workflow and declare workflow_call secrets (#487)

    * security: harden release workflow and declare workflow_call secrets

    - Replace actions/checkout v4.3.1 with v6.0.3 and switch from PERSONAL_ACCESS_TOKEN to GITHUB_TOKEN
    - Fix script injection in Download CLI, Tag, Update POM, Build artifactId, and Publish steps by moving inputs to env vars
    - Replace deprecated ::set-output with $GITHUB_OUTPUT in Tag step
    - Update actions/setup-java v4.3.0 to v5.2.0
    - Add explicit secrets declaration for workflow_call (MAVEN_GPG_PASSPHRASE, MAVEN_GPG_PRIVATE_KEY, OSSRH_TOKEN, OSSRH_USERNAME)
    - Fix broken shell conditional in Build artifactId property step

    * chore(gha): harden GitHub Actions workflows security

    * chore(gha): disable nightly trigger and remove pr-labeler workflow

    * chore(gha): configure echo mirror for Maven dependency resolution

commit 6661e60
Author: Atish Jadhav <141334503+cx-atish-jadhav@users.noreply.github.com>
Date:   Thu Jun 18 22:49:44 2026 +0530

    Updating ast-cli version and binaries 2.3.54 (#485)

    * Updating ast-cli version and binaries

    * Harden workflows: scope permissions, fix set-output, replace dev-drprasad, remove repository_dispatch, comment notify and spotbugs

    * Remove Maven cache from release and CI workflows

    * Add publish input to gate Maven Central deploy

    ---------

    Co-authored-by: Luís Ventuzelos <207163323+cx-luis-ventuzelos@users.noreply.github.com>

commit 06b449c
Author: Alon Rosenhek <80337069+cx-alon-rosenhek@users.noreply.github.com>
Date:   Thu Jun 18 16:57:16 2026 +0300

    chore: remove .github/workflows/dependabot-auto-merge.yml

commit 6fb3166
Author: Ohad Israeli <243351248+cx-ohad-israeli@users.noreply.github.com>
Date:   Wed Jun 10 17:39:51 2026 +0300

    chore: remove Dependabot configuration

commit 814a504
Author: stepsecurity-app[bot] <188008098+stepsecurity-app[bot]@users.noreply.github.com>
Date:   Fri May 29 21:25:57 2026 -0400

    [StepSecurity] Apply security best practices (#481)

    Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
    Co-authored-by: stepsecurity-app[bot] <188008098+stepsecurity-app[bot]@users.noreply.github.com>
cx-alon-rosenhek pushed a commit that referenced this pull request Jul 20, 2026
…#479)

* AST-146807: Create Cloud MD file for ast-cli-java-wrapper repository

- Added comprehensive Cloud.md with all essential sections:
  - Project Overview
  - Architecture and design patterns
  - Repository structure
  - Technology stack (Maven, Java 8, Jackson, Lombok, etc.)
  - Development setup and prerequisites
  - Coding standards and guidelines
  - Project rules and conventions
  - Testing strategy with JUnit 5 and code coverage
  - Known issues and limitations

- Included recommended sections:
  - Database schema (N/A for client library)
  - External integrations (AST Platform, Maven Central)
  - Deployment information
  - Performance considerations
  - API/Endpoints/Interfaces documentation
  - Security & Access controls
  - Logging configuration
  - Debugging steps and common issues

- Documentation follows the standardization template from epic AST-146793

* Squashed commit of the following:

commit 8e107dc
Author: Atish Jadhav <atish.jadhav@checkmarx.com>
Date:   Tue Jun 23 19:34:27 2026 +0530

    security: fix SCA vulnerability for JUnit (#488)

    Co-authored-by: Luís Ventuzelos <207163323+cx-luis-ventuzelos@users.noreply.github.com>

commit 06dafaa
Author: Luís Ventuzelos <207163323+cx-luis-ventuzelos@users.noreply.github.com>
Date:   Mon Jun 22 12:37:18 2026 +0100

    security: harden release workflow and declare workflow_call secrets (#487)

    * security: harden release workflow and declare workflow_call secrets

    - Replace actions/checkout v4.3.1 with v6.0.3 and switch from PERSONAL_ACCESS_TOKEN to GITHUB_TOKEN
    - Fix script injection in Download CLI, Tag, Update POM, Build artifactId, and Publish steps by moving inputs to env vars
    - Replace deprecated ::set-output with $GITHUB_OUTPUT in Tag step
    - Update actions/setup-java v4.3.0 to v5.2.0
    - Add explicit secrets declaration for workflow_call (MAVEN_GPG_PASSPHRASE, MAVEN_GPG_PRIVATE_KEY, OSSRH_TOKEN, OSSRH_USERNAME)
    - Fix broken shell conditional in Build artifactId property step

    * chore(gha): harden GitHub Actions workflows security

    * chore(gha): disable nightly trigger and remove pr-labeler workflow

    * chore(gha): configure echo mirror for Maven dependency resolution

commit 6661e60
Author: Atish Jadhav <141334503+cx-atish-jadhav@users.noreply.github.com>
Date:   Thu Jun 18 22:49:44 2026 +0530

    Updating ast-cli version and binaries 2.3.54 (#485)

    * Updating ast-cli version and binaries

    * Harden workflows: scope permissions, fix set-output, replace dev-drprasad, remove repository_dispatch, comment notify and spotbugs

    * Remove Maven cache from release and CI workflows

    * Add publish input to gate Maven Central deploy

    ---------

    Co-authored-by: Luís Ventuzelos <207163323+cx-luis-ventuzelos@users.noreply.github.com>

commit 06b449c
Author: Alon Rosenhek <80337069+cx-alon-rosenhek@users.noreply.github.com>
Date:   Thu Jun 18 16:57:16 2026 +0300

    chore: remove .github/workflows/dependabot-auto-merge.yml

commit 6fb3166
Author: Ohad Israeli <243351248+cx-ohad-israeli@users.noreply.github.com>
Date:   Wed Jun 10 17:39:51 2026 +0300

    chore: remove Dependabot configuration

commit 814a504
Author: stepsecurity-app[bot] <188008098+stepsecurity-app[bot]@users.noreply.github.com>
Date:   Fri May 29 21:25:57 2026 -0400

    [StepSecurity] Apply security best practices (#481)

    Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
    Co-authored-by: stepsecurity-app[bot] <188008098+stepsecurity-app[bot]@users.noreply.github.com>

* Update to AST CLI 2.3.55 and switch to Echo repository

Updates the AST CLI binaries to version 2.3.55 across all platforms (Linux, Linux ARM, macOS, Windows). Switches distribution from Sonatype Central to Checkmarx's Echo repository, adds Echo repository configuration to pom.xml for dependencies and plugins, and configures Maven mirror authentication in CI/release workflows with ECHO_LIBRARIES_ACCESS_KEY secret. Also adds .vscode to gitignore.

* Release 2.3.56 with Jackson 2.22.0 update

Update Jackson dependency from 2.21.1 to 2.22.0 and bump CLI version to 2.3.56.

Also includes:
- Updated CLI binaries for all platforms (Linux, Linux ARM, macOS, Windows)
- Fixed Maven mirror ID in CI workflows from 'echo' to 'echo-repo' for proper dependency resolution

* Improve Maven echo mirror config in GH workflows

Make configuring the Echo Maven mirror more robust in CI and release workflows. In .github/workflows/ci.yml create ~/.m2 and write a complete settings.xml via heredoc (ensures the file exists and injects the echo-repo server/mirror using the ECHO_LIBRARIES_ACCESS_KEY secret). In .github/workflows/release.yml replace the single fragile sed with two targeted sed commands to insert the server and mirrors entries. These changes reduce brittle sed usage and avoid failures when ~/.m2/settings.xml is missing or structured differently.

* test: remove PATH_TO_EXECUTABLE guard to enable previously skipped realtime integration tests

* Add Zizmor scan and disable checkout credentials

Add a new workflow (scan-github-action.yml) to run the Zizmor linter against GitHub Actions (pedantic persona, annotations/offline disabled). Update existing workflows (.github/workflows/checkmarx-one-scan.yml, ci.yml, update-cli.yml) to set actions/checkout persist-credentials: false to avoid leaking GITHUB_TOKEN to third-party actions.

* fix: resolve all Zizmor GitHub Actions security findings

* fix: restore integration-tests check name and suppress zizmor anonymous-definition

---------

Co-authored-by: Atish Jadhav <141334503+cx-atish-jadhav@users.noreply.github.com>
Co-authored-by: atishj99 <atish.jadhav@checkmarx.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants