Skip to content

chore(ci): pin cicd-workflows reusable workflows to commit SHA#112

Closed
AlexanderLanin wants to merge 1 commit intomainfrom
chore/pin-cicd-workflows
Closed

chore(ci): pin cicd-workflows reusable workflows to commit SHA#112
AlexanderLanin wants to merge 1 commit intomainfrom
chore/pin-cicd-workflows

Conversation

@AlexanderLanin
Copy link
Member

This PR is part of a large-scale CI refactoring across all S-CORE repositories.

See the tracking issue:
eclipse-score/cicd-workflows#75

It updates reusable workflow references from eclipse-score/cicd-workflows
to the pinned commit SHA (tagged as v0.0.0):

c1c90b1a82a1fab0fc202979dde6686b2162d5a8 # v0.0.0

Only the @ref part of workflow calls is changed, for workflows under:

eclipse-score/cicd-workflows/.github/workflows/*

Pinning reusable workflows to a commit SHA ensures stable and reproducible CI
behavior instead of relying on a moving branch reference.

Part of eclipse-score/cicd-workflows#75

jobs:
copyright-check:
uses: eclipse-score/cicd-workflows/.github/workflows/copyright.yml@main
uses: eclipse-score/cicd-workflows/.github/workflows/copyright.yml@c1c90b1a82a1fab0fc202979dde6686b2162d5a8 # v0.0.0

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 8 days ago

To fix the problem, explicitly declare a permissions: block that grants the minimal required access for this workflow. Since this workflow only triggers copyright checks using a reusable workflow and there is no evidence it needs to write to the repository, a safe minimal default is read‑only repository contents. This is typically expressed as permissions: contents: read at the workflow root so it applies to all jobs, including the copyright-check job that reuses another workflow.

Concretely, in .github/workflows/copyright.yml, add a permissions: section after the name: (or before jobs:) and set contents: read. This will ensure that, unless the reusable workflow further expands permissions, the GITHUB_TOKEN used by this workflow is restricted to reading repository contents only. No additional imports or external dependencies are needed; this is purely a YAML configuration change within the workflow file and does not alter existing functionality of the copyright checks.

Suggested changeset 1
.github/workflows/copyright.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/copyright.yml b/.github/workflows/copyright.yml
--- a/.github/workflows/copyright.yml
+++ b/.github/workflows/copyright.yml
@@ -11,6 +11,8 @@
 # SPDX-License-Identifier: Apache-2.0
 # *******************************************************************************
 name: Copyright checks
+permissions:
+  contents: read
 on:
   pull_request:
     types: [opened, reopened, synchronize]
EOF
@@ -11,6 +11,8 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
name: Copyright checks
permissions:
contents: read
on:
pull_request:
types: [opened, reopened, synchronize]
Copilot is powered by AI and may make mistakes. Always verify output.
@github-actions
Copy link

The created documentation from the pull request is available at: docu-html

@4og
Copy link
Member

4og commented Mar 12, 2026

Merged in a3c843c

@4og 4og closed this Mar 12, 2026
@github-project-automation github-project-automation bot moved this from In Progress to Done in BAS - Baselibs FT Mar 12, 2026
@4og 4og deleted the chore/pin-cicd-workflows branch March 12, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants