Skip to content

feat: Release V3.0.0#367

Closed
scott45 wants to merge 21 commits intomainfrom
dev
Closed

feat: Release V3.0.0#367
scott45 wants to merge 21 commits intomainfrom
dev

Conversation

@scott45
Copy link
Copy Markdown
Contributor

@scott45 scott45 commented Nov 13, 2025

SPDX-License-Identifier: Apache-2.0

What did we change?

Initiate Tazama Release V3.0.0.

How was it tested?

  • Locally
  • Development Environment
  • Not needed, changes very basic
  • Husky successfully run
  • Unit tests passing and Documentation done

Summary by CodeRabbit

  • New Features

    • Enforced PR branch targeting (dev or release)
    • Added supply‑chain security scan (Scorecard)
    • Added reusable workflows for rule processor packaging (stable & RC)
  • Bug Fixes

    • Fixed configuration loading to use the correct tenant identifier
  • Chores

    • Bumped version to 4.0.0-rc.0 and updated dependencies
    • Removed benchmark automation and cleared CHANGELOG
    • Migrated code ownership to team-based entries
    • Pinned CI actions and improved CI Docker/secret handling

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 3, 2026

Warning

Rate limit exceeded

@Justus-at-Tazama has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 35 minutes and 9 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bf1b5ae7-67f3-4689-8f93-c50d261ed534

📥 Commits

Reviewing files that changed from the base of the PR and between 4d8326d and 634ec2b.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (15)
  • .codacy.yml
  • .github/dependabot.yml
  • .github/workflows/codacy.yml
  • .github/workflows/codeql.yml
  • .github/workflows/conventional-commits.yml
  • .github/workflows/dco-check.yaml
  • .github/workflows/encoding-check.yml
  • .github/workflows/njsscan.yml
  • .github/workflows/node.js.yml
  • .github/workflows/package-rule-rc.yml
  • .github/workflows/package-rule.yml
  • .github/workflows/scorecard.yml
  • __tests__/unit/logic.service.test.ts
  • package.json
  • src/logic.service.ts
📝 Walkthrough

Walkthrough

Repository-wide infra and CI changes: updated CODEOWNERS to team-based entries, removed a benchmark workflow, added/modified many GitHub Actions (pinned action SHAs, new branch-target and scorecard workflows, reusable rule packaging workflows), bumped package to 4.0.0-rc.0, removed CHANGELOG/VERSION, switched Dockerfile to BuildKit secrets, and one small service tenant-id fix.

Changes

Code Ownership Management

Layer / File(s) Summary
Ownership
.github/CODEOWNERS
Replaced three individual GitHub handles with two GitHub teams: @tazama-lf/core-codeowners, @tazama-lf/community-codeowners.

Benchmark Workflow Removal

Layer / File(s) Summary
Workflow Deletion
.github/workflows/bench.yml
Deleted benchmark CI workflow that merged per-repo CSVs into an external repo/branch.

Branch & Scorecard Gateworkflows

Layer / File(s) Summary
New Gate
.github/workflows/branch-target-check.yml
New PR check enforcing source branch is dev or release/v[0-9]*, skips Dependabot.
Security Analysis
.github/workflows/scorecard.yml
Added OSSF Scorecard workflow (SARIF artifact + upload) with schedule and main push triggers.

Reusable Rule Packaging (independent DAG)

Layer / File(s) Summary
API/Inputs
.github/workflows/package-rule.yml, .github/workflows/package-rule-rc.yml
New reusable workflows (workflow_call) with inputs rule_number, rule_org and required secrets for Docker/Slack/GH token.
Checkout & Validation
...package-rule*.yml
Read caller package.json version, validate stable vs prerelease, skip Dependabot.
Clone & Patch
...package-rule*.yml
Clone tazama-lf/rule-executer, copy into rule-specific dir, rewrite package.json dependency and Dockerfile ENV via sed/grep.
Build & Publish
...package-rule*.yml
npm install, docker build, tag (version + latest/rc), push to Docker Hub, remove local tags; RC workflow permits dev publish, stable requires main branch.
Notification
...package-rule*.yml
Send Slack webhook with rule/version info; Slack failures ignored.

Workflow Pinning, Hardening & Misc CI Changes

Layer / File(s) Summary
Pinning & Permissions
.github/workflows/{codacy,codeql,conventional-commits,dco-check,dependency-review,dockerfile-linter,gpg-verify,njsscan,sbom,dockerhub-image-build,dockerhub-image-build-rc,release,milestone,...}.yml
Pinned many third-party actions to commit SHAs, standardized actions/checkout pin, adjusted job permissions.
Guards & Robustness
same files
Added agent skips (github-actions bot, dependabot), conditional steps (skip hadolint/SBOM when no Dockerfile), hardened curl/git handling, switched some flows to use commit SHAs and $GITHUB_OUTPUT.

Release / Changelog / Milestone Flow Changes

Layer / File(s) Summary
Release Logic
.github/workflows/release.yml
Replaced external PR-title-based release detection with local git describe and commit-scan logic for release_type/version; switched to gh release create; moved to $GITHUB_OUTPUT.
Milestone Handling
.github/workflows/milestone.yml
Removed prior checkout/ENV exports, tightened curl to --fail -s, pinned repository-dispatch action SHA.

Container Build Changes

Layer / File(s) Summary
Dockerfile BuildKit
Dockerfile
Added # syntax=docker/dockerfile:1, removed ARG GH_TOKEN, switched to BuildKit secret mounts (--mount=type=secret,id=GH_TOKEN,env=GH_TOKEN) for npm ci steps.

Package, Versioning & Changelog

Layer / File(s) Summary
Package Bump
package.json
Bumped package version 3.0.04.0.0-rc.0; upgraded @tazama-lf deps to RC versions.
Docs / Metadata Removal
CHANGELOG.md, VERSION
Removed CHANGELOG.md contents and deleted/stripped VERSION file content.

Application Logic

Layer / File(s) Summary
Tenant ID Fix
src/services/services.ts
Changed loadAllTypologyConfigs to call databaseManager.getTypologyConfig(..., networkMap.tenantId) instead of typology.tenantId.

Sequence Diagram(s)

sequenceDiagram
    actor Caller as Caller
    participant GH as GitHub Actions
    participant Repo as Caller Repo
    participant RuleExec as Rule-Executer Repo
    participant Docker as DockerHub
    participant Slack as Slack webhook

    Caller->>GH: workflow_call(rule_number, rule_org, secrets)
    GH->>Repo: checkout caller repo/context
    GH->>GitHub: clone RuleExec (main/dev) using GH_TOKEN_LIB
    GH->>Repo: copy rule-executer -> rewrite package.json & Dockerfile
    GH->>GH: npm install / docker build
    GH->>Docker: tag (version & latest/rc) -> push
    GH->>Docker: remove local tags
    GH->>Slack: POST notification (rule, version, link)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers

  • Sandy-at-Tazama

Poem

🐰 I hopped through YAML with pins and cheer,

Teams replaced users, infra made clear.
Secrets tucked in BuildKit's cozy nest,
Rules build, tag, and push — then take a rest.
A rabbit's clap for CI, nice and dear!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title states 'Release V3.0.0' but the actual changes upgrade the package version to 4.0.0-rc.0, making the title inaccurate and misleading. Update the PR title to reflect the actual version change, e.g., 'feat: Release V4.0.0-rc.0' or 'chore: Bump version to 4.0.0-rc.0 and sync workflows'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Justus-at-Tazama and others added 6 commits April 5, 2026 12:57
ci: remove bench.yml (dead code, no redesign planned)
…G GH_TOKEN from all build stages and replaces plain npm ci with RUN --mount=type=secret so the token is available only within that RUN step and is never recorded in image layer history (docker history). Part of the coordinated migration tracked in tazama-lf/workflows#52.
Signed-off-by: Justus-at-Tazama <Justus-at-Tazama@users.noreply.github.com>
ci: sync workflows from central-workflows
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (6)
.github/workflows/milestone.yml (1)

40-45: Consider upgrading peter-evans/repository-dispatch to a newer version.

The action is pinned to v1, but v4 is the current major version. While SHA pinning provides security benefits, v1 lacks features and bug fixes present in newer versions.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/milestone.yml around lines 40 - 45, The workflow pins
peter-evans/repository-dispatch to an old v1 SHA in the uses statement, which
misses newer features and fixes; update the uses entry (the line containing
"uses:
peter-evans/repository-dispatch@ce5485de42c9b2622d2ed064be479e8ed65e76f4") to a
current v4 reference (either a v4 tag like "@v4" or a v4 commit SHA) and ensure
the rest of the input parameters (token, repository, event-type, client-payload)
remain unchanged; if you prefer strict pinning, replace the SHA with a vetted v4
commit SHA instead of the v1 SHA.
.github/workflows/gpg-verify.yml (1)

30-33: Redundant environment variable assignment.

The env: block already makes PR_HEAD_REF, PR_BASE_REF, GH_TOKEN, and GH_REPO available to the step. Then they're re-exported to $GITHUB_ENV with slightly different names (GITHUB_TOKEN, GITHUB_REPOSITORY). The subsequent step at line 36 uses $PR_BASE_REF and $PR_HEAD_REF directly (set via $GITHUB_ENV), but $GITHUB_TOKEN and $GITHUB_REPOSITORY are already available as default environment variables.

Consider simplifying by using the already-available $GITHUB_TOKEN and $GITHUB_REPOSITORY directly, or use consistent naming.

💡 Suggested simplification
     - name: Set up environment variables
       env:
         PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
         PR_BASE_REF: ${{ github.event.pull_request.base.ref }}
-        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        GH_REPO: ${{ github.repository }}
       run: |
         printf 'PR_HEAD_REF=%s\n' "$PR_HEAD_REF" >> "$GITHUB_ENV"
         printf 'PR_BASE_REF=%s\n' "$PR_BASE_REF" >> "$GITHUB_ENV"
-        printf 'GITHUB_TOKEN=%s\n' "$GH_TOKEN" >> "$GITHUB_ENV"
-        printf 'GITHUB_REPOSITORY=%s\n' "$GH_REPO" >> "$GITHUB_ENV"

Then in the subsequent step, use ${{ secrets.GITHUB_TOKEN }} and ${{ github.repository }} directly in the env: block.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/gpg-verify.yml around lines 30 - 33, Remove the redundant
re-exporting of variables into GITHUB_ENV: stop writing
PR_HEAD_REF/PR_BASE_REF/GITHUB_TOKEN/GITHUB_REPOSITORY via printf to
"$GITHUB_ENV"; instead rely on the step's env: inputs and GitHub-provided
variables (use PR_HEAD_REF and PR_BASE_REF if you need those from env, and use
the existing GITHUB_TOKEN / github.repository or secrets.GITHUB_TOKEN directly
where required). Ensure naming is consistent (either keep PR_* names for PR refs
or use GITHUB_REPOSITORY/GITHUB_TOKEN directly) and delete the printf lines that
set GITHUB_TOKEN and GITHUB_REPOSITORY to avoid duplication.
.github/workflows/scorecard.yml (1)

52-55: Consider aligning codeql-action versions across workflows.

This workflow uses github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc (v4.34.1), while njsscan.yml uses a different SHA marked as v3. Consider aligning versions for consistency, unless intentional.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/scorecard.yml around lines 52 - 55, The workflows use
different pinned versions of the CodeQL upload action; update the upload action
reference in this file (the uses entry
"github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc") to
match the SHA/tag used in njsscan.yml (or vice‑versa) so both workflows use the
same github/codeql-action/upload-sarif version; make sure the chosen SHA/tag
corresponds to the intended release (e.g., v4.34.1) and update the uses string
consistently in both workflow files.
.github/workflows/dockerhub-image-build.yml (1)

16-20: Workflow may trigger twice for releases.

With both push: branches: [main] and release: types: [published], if a release is created from main, both triggers could fire. Consider if this is intentional or if the push trigger should be removed for release workflows.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/dockerhub-image-build.yml around lines 16 - 20, The
workflow currently has two triggers—on: push: branches: [ "main" ] and on:
release: types: [published ]—which can both fire when a release is created from
main; decide which behavior you want and update the triggers accordingly: either
remove the push trigger (delete the on: push block) so only release events run,
or restrict push to non-release events (e.g., change push to tags or add an if:
condition like github.event_name == 'push' on the job), or keep both but add a
job-level conditional to skip when github.event_name == 'release'; update the
on: push / on: release configuration and any job-level if conditions to enforce
the chosen behavior.
.github/workflows/package-rule-rc.yml (1)

94-147: Significant code duplication with package-rule.yml.

The modification logic (lines 94-147) is nearly identical to the stable workflow. Consider extracting this into a shared composite action or script to reduce maintenance burden and ensure consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/package-rule-rc.yml around lines 94 - 147, The changes
duplicate logic from package-rule.yml — extract the shared
substitution/validation steps (the case on RULE_ORG, sed replacements for
package.json and Dockerfile, the grep validations for
"npm:${EXPECTED_SCOPE}/rule-${RULE_NUM}@${VERSION}", ENV RULE_NAME and ENV
APM_SERVICE_NAME) into a single reusable unit (either a composite GitHub Action
or an executable script invoked by both workflows) and replace the inline block
in this file with a call to that unit; ensure the reusable unit accepts inputs
RULE_DIR, RULE_NUM, RULE_ORG and VERSION and preserves the same sed/grep checks
(including EXPECTED_SCOPE logic) so both workflows behave identically.
.github/workflows/release.yml (1)

86-90: Consider capturing and displaying curl errors for better debugging.

The --fail flag will cause a non-zero exit on HTTP errors, but the error response body is discarded. When debugging milestone fetch failures, it would help to capture the response.

♻️ Optional: Capture error response
-          MILESTONE_RESPONSE=$(curl --fail -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/milestones/${MILESTONE_NUMBER}")
+          MILESTONE_RESPONSE=$(curl --fail -sS -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/milestones/${MILESTONE_NUMBER}") || {
+            echo "::error::Failed to fetch milestone ${MILESTONE_NUMBER}"
+            exit 1
+          }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml around lines 86 - 90, The current curl call
uses --fail so HTTP error bodies are discarded; change the fetch for the
milestone so you capture both the response body and HTTP status (e.g., call curl
without --fail and use -w to capture the status into a separate variable), store
the body in MILESTONE_RESPONSE and the status in a new variable (e.g.,
MILESTONE_STATUS), then check MILESTONE_STATUS for non-2xx responses and
log/echo the full MILESTONE_RESPONSE (including the error payload) before
exiting; keep the same Authorization header and repo URL and update the
conditional that follows to use the new status check.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/release.yml:
- Line 143: The git log invocation that builds commit_messages uses color format
specifiers (%C(yellow) and %Creset) which emit ANSI codes into the changelog
file; update the git log --pretty=format string used to populate commit_messages
(the local commit_messages=$(git log ... $GIT_LOG_RANGE --grep="$section_label"
... ) line) to remove color markers and instead use a plain placeholder for the
commit hash (e.g., %H or %h) so the output written to the changelog file
contains only readable text without ANSI escape sequences.

In `@package.json`:
- Line 3: The PR title and the package.json "version" field are inconsistent (PR
title says v3.0.0 while package.json shows "4.0.0-rc.0"); update one so they
match: either change the PR title to "Release v4.0.0-rc.0" to reflect the
current package.json version or bump/downgrade the package.json "version" value
to "3.0.0" (or "3.0.0-rc.0" if you intend a release candidate) so it matches the
intended PR; ensure the chosen version string is used consistently in the commit
and changelog entries as well.

---

Nitpick comments:
In @.github/workflows/dockerhub-image-build.yml:
- Around line 16-20: The workflow currently has two triggers—on: push: branches:
[ "main" ] and on: release: types: [published ]—which can both fire when a
release is created from main; decide which behavior you want and update the
triggers accordingly: either remove the push trigger (delete the on: push block)
so only release events run, or restrict push to non-release events (e.g., change
push to tags or add an if: condition like github.event_name == 'push' on the
job), or keep both but add a job-level conditional to skip when
github.event_name == 'release'; update the on: push / on: release configuration
and any job-level if conditions to enforce the chosen behavior.

In @.github/workflows/gpg-verify.yml:
- Around line 30-33: Remove the redundant re-exporting of variables into
GITHUB_ENV: stop writing PR_HEAD_REF/PR_BASE_REF/GITHUB_TOKEN/GITHUB_REPOSITORY
via printf to "$GITHUB_ENV"; instead rely on the step's env: inputs and
GitHub-provided variables (use PR_HEAD_REF and PR_BASE_REF if you need those
from env, and use the existing GITHUB_TOKEN / github.repository or
secrets.GITHUB_TOKEN directly where required). Ensure naming is consistent
(either keep PR_* names for PR refs or use GITHUB_REPOSITORY/GITHUB_TOKEN
directly) and delete the printf lines that set GITHUB_TOKEN and
GITHUB_REPOSITORY to avoid duplication.

In @.github/workflows/milestone.yml:
- Around line 40-45: The workflow pins peter-evans/repository-dispatch to an old
v1 SHA in the uses statement, which misses newer features and fixes; update the
uses entry (the line containing "uses:
peter-evans/repository-dispatch@ce5485de42c9b2622d2ed064be479e8ed65e76f4") to a
current v4 reference (either a v4 tag like "@v4" or a v4 commit SHA) and ensure
the rest of the input parameters (token, repository, event-type, client-payload)
remain unchanged; if you prefer strict pinning, replace the SHA with a vetted v4
commit SHA instead of the v1 SHA.

In @.github/workflows/package-rule-rc.yml:
- Around line 94-147: The changes duplicate logic from package-rule.yml —
extract the shared substitution/validation steps (the case on RULE_ORG, sed
replacements for package.json and Dockerfile, the grep validations for
"npm:${EXPECTED_SCOPE}/rule-${RULE_NUM}@${VERSION}", ENV RULE_NAME and ENV
APM_SERVICE_NAME) into a single reusable unit (either a composite GitHub Action
or an executable script invoked by both workflows) and replace the inline block
in this file with a call to that unit; ensure the reusable unit accepts inputs
RULE_DIR, RULE_NUM, RULE_ORG and VERSION and preserves the same sed/grep checks
(including EXPECTED_SCOPE logic) so both workflows behave identically.

In @.github/workflows/release.yml:
- Around line 86-90: The current curl call uses --fail so HTTP error bodies are
discarded; change the fetch for the milestone so you capture both the response
body and HTTP status (e.g., call curl without --fail and use -w to capture the
status into a separate variable), store the body in MILESTONE_RESPONSE and the
status in a new variable (e.g., MILESTONE_STATUS), then check MILESTONE_STATUS
for non-2xx responses and log/echo the full MILESTONE_RESPONSE (including the
error payload) before exiting; keep the same Authorization header and repo URL
and update the conditional that follows to use the new status check.

In @.github/workflows/scorecard.yml:
- Around line 52-55: The workflows use different pinned versions of the CodeQL
upload action; update the upload action reference in this file (the uses entry
"github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc") to
match the SHA/tag used in njsscan.yml (or vice‑versa) so both workflows use the
same github/codeql-action/upload-sarif version; make sure the chosen SHA/tag
corresponds to the intended release (e.g., v4.34.1) and update the uses string
consistently in both workflow files.
🪄 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: CHILL

Plan: Pro

Run ID: c9280e76-f687-4443-ac23-078a66d3d703

📥 Commits

Reviewing files that changed from the base of the PR and between 0028ab6 and fe7e4c0.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (24)
  • .github/CODEOWNERS
  • .github/workflows/bench.yml
  • .github/workflows/branch-target-check.yml
  • .github/workflows/codacy.yml
  • .github/workflows/codeql.yml
  • .github/workflows/conventional-commits.yml
  • .github/workflows/dco-check.yml
  • .github/workflows/dependency-review.yml
  • .github/workflows/dockerfile-linter.yml
  • .github/workflows/dockerhub-image-build-rc.yml
  • .github/workflows/dockerhub-image-build.yml
  • .github/workflows/gpg-verify.yml
  • .github/workflows/milestone.yml
  • .github/workflows/njsscan.yml
  • .github/workflows/package-rule-rc.yml
  • .github/workflows/package-rule.yml
  • .github/workflows/release.yml
  • .github/workflows/sbom.yml
  • .github/workflows/scorecard.yml
  • CHANGELOG.md
  • Dockerfile
  • VERSION
  • package.json
  • src/services/services.ts
💤 Files with no reviewable changes (3)
  • VERSION
  • .github/workflows/bench.yml
  • CHANGELOG.md

local section_icon="$3"
# Get the commit messages with the specified label between the last release and the current release
local commit_messages=$(git log --pretty=format:"- %s (Linked Issues: %C(yellow)%H%Creset)" "$LAST_RELEASE_TAG..HEAD" --grep="$section_label" --no-merges --decorate --decorate-refs=refs/issues)
local commit_messages=$(git log --pretty=format:"- %s (Linked Issues: %C(yellow)%H%Creset)" $GIT_LOG_RANGE --grep="$section_label" --no-merges --decorate --decorate-refs=refs/issues)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Color escape codes will appear as literal text in the changelog file.

The %C(yellow) and %Creset format specifiers produce ANSI escape codes, which will render as garbled text in the changelog file (e.g., [33m...). Consider removing color codes since this output goes to a file, not a terminal.

🐛 Proposed fix
-            local commit_messages=$(git log --pretty=format:"- %s (Linked Issues: %C(yellow)%H%Creset)" $GIT_LOG_RANGE --grep="$section_label" --no-merges --decorate --decorate-refs=refs/issues)
+            local commit_messages=$(git log --pretty=format:"- %s (Commit: %H)" $GIT_LOG_RANGE --grep="$section_label" --no-merges)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
local commit_messages=$(git log --pretty=format:"- %s (Linked Issues: %C(yellow)%H%Creset)" $GIT_LOG_RANGE --grep="$section_label" --no-merges --decorate --decorate-refs=refs/issues)
local commit_messages=$(git log --pretty=format:"- %s (Commit: %H)" $GIT_LOG_RANGE --grep="$section_label" --no-merges)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml at line 143, The git log invocation that
builds commit_messages uses color format specifiers (%C(yellow) and %Creset)
which emit ANSI codes into the changelog file; update the git log
--pretty=format string used to populate commit_messages (the local
commit_messages=$(git log ... $GIT_LOG_RANGE --grep="$section_label" ... ) line)
to remove color markers and instead use a plain placeholder for the commit hash
(e.g., %H or %h) so the output written to the changelog file contains only
readable text without ANSI escape sequences.

Comment thread package.json Outdated
{
"name": "typology-processor",
"version": "3.0.0",
"version": "4.0.0-rc.0",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

PR title inconsistency with package version.

The PR title states "Release V3.0.0" but the package version is 4.0.0-rc.0. Consider aligning these to avoid confusion.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 3, The PR title and the package.json "version" field
are inconsistent (PR title says v3.0.0 while package.json shows "4.0.0-rc.0");
update one so they match: either change the PR title to "Release v4.0.0-rc.0" to
reflect the current package.json version or bump/downgrade the package.json
"version" value to "3.0.0" (or "3.0.0-rc.0" if you intend a release candidate)
so it matches the intended PR; ensure the chosen version string is used
consistently in the commit and changelog entries as well.

Signed-off-by: Justus-at-Tazama <Justus-at-Tazama@users.noreply.github.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (4)
.github/workflows/njsscan.yml (1)

46-46: Inconsistent codeql-action versions across workflows.

This workflow pins github/codeql-action/upload-sarif to v4.35.1, while dockerfile-linter.yml pins it to v3. Consider aligning on a single major version across workflows for consistency and easier maintenance.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/njsscan.yml at line 46, The workflow pins
github/codeql-action/upload-sarif to v4.35.1 which mismatches the
dockerfile-linter.yml pin to v3; update the uses line
(github/codeql-action/upload-sarif@60168ffe96596fce55ee3851b6bb7b2e1ea8dbb0) to
the same major version used in dockerfile-linter.yml (or vice versa) so both
workflows reference the same major tag (e.g., change to
github/codeql-action/upload-sarif@v3 or update the other workflow to v4) to
ensure consistent action versions across workflows.
.github/workflows/package-rule.yml (2)

97-120: Consider validating rule_number input format.

The rule_org is validated via the case statement, but rule_number is used directly in sed commands and file paths without validation. While the description says it should be zero-padded (e.g., "001", "901"), a malformed input could cause unexpected behavior in sed substitutions or directory naming.

🛡️ Proposed validation for rule_number

Add validation at the start of the step:

          RULE_DIR="rule-executer-${{ inputs.rule_number }}"
          RULE_NUM="${{ inputs.rule_number }}"
          RULE_ORG="${{ inputs.rule_org }}"
          VERSION="${{ steps.rule_version.outputs.VERSION }}"

+         # Validate rule_number is a zero-padded numeric string
+         if ! [[ "$RULE_NUM" =~ ^[0-9]+$ ]]; then
+           echo "::error::rule_number must be numeric (got: '${RULE_NUM}')"
+           exit 1
+         fi
+
          echo "Applying substitutions for rule-${RULE_NUM} (org: ${RULE_ORG}, version: ${VERSION})"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/package-rule.yml around lines 97 - 120, The workflow uses
RULE_NUM (RULE_DIR, RULE_ORG, and the sed substitutions) without validating the
input RULE_NUMBER, which can break sed patterns and paths; add an early
validation step that checks RULE_NUM matches the expected zero-padded numeric
format (e.g., a regex like three digits) and exits with an error if it doesn't,
before constructing RULE_DIR or running the sed commands, and update the error
message to include the invalid RULE_NUMBER and expected format so the step fails
fast and clearly.

185-217: Minor: JSON payload could break with unexpected characters in inputs.

The Slack notification constructs JSON using string interpolation. If rule_number or VERSION contained quotes or special characters, the JSON would be malformed. While the version is validated and rule_number should be numeric, consider using jq for safer JSON construction.

💡 Optional: Use jq for safer JSON construction
      - name: Send Slack notification
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
+         RULE_NUM: ${{ inputs.rule_number }}
+         VERSION: ${{ steps.rule_version.outputs.VERSION }}
        run: |
-         curl -s -X POST -H 'Content-type: application/json' --data '{
-           "blocks": [
-             ...
-           ]
-         }' "$SLACK_WEBHOOK_URL" || true
+         PAYLOAD=$(jq -n \
+           --arg rule "$RULE_NUM" \
+           --arg version "$VERSION" \
+           '{
+             blocks: [
+               {type: "header", text: {type: "plain_text", text: "New Rule stable Docker image published :white_check_mark:", emoji: true}},
+               {type: "section", fields: [
+                 {type: "mrkdwn", text: "*Rule:*\nrule-\($rule)"},
+                 {type: "mrkdwn", text: "*Version:*\n\($version)"},
+                 {type: "mrkdwn", text: "*DockerHub:*\n<https://hub.docker.com/orgs/tazamaorg/repositories>"}
+               ]}
+             ]
+           }')
+         curl -s -X POST -H 'Content-type: application/json' --data "$PAYLOAD" "$SLACK_WEBHOOK_URL" || true
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/package-rule.yml around lines 185 - 217, The Slack step
"Send Slack notification" constructs JSON via string interpolation which can
break if inputs.rule_number or steps.rule_version.outputs.VERSION contain
quotes/special chars; change the step to build the payload safely (e.g., use jq
or printf with proper escaping) and pass the resulting JSON to curl via
SLACK_PAYLOAD or stdin; update references to rule-${{ inputs.rule_number }} and
${{ steps.rule_version.outputs.VERSION }} so they are fed into jq (or an escaped
here-doc) rather than concatenated into raw JSON in the run script.
.github/workflows/package-rule-rc.yml (1)

94-147: Same recommendation: Consider validating rule_number input format.

This RC workflow has the same input validation gap as the stable workflow. The rule_number input is used directly in sed commands and file paths without validation.

🛡️ Proposed validation for rule_number

Add validation at the start of the step:

          RULE_DIR="rule-executer-${{ inputs.rule_number }}"
          RULE_NUM="${{ inputs.rule_number }}"
          RULE_ORG="${{ inputs.rule_org }}"
          VERSION="${{ steps.rule_version.outputs.VERSION }}"

+         # Validate rule_number is a zero-padded numeric string
+         if ! [[ "$RULE_NUM" =~ ^[0-9]+$ ]]; then
+           echo "::error::rule_number must be numeric (got: '${RULE_NUM}')"
+           exit 1
+         fi
+
          echo "Applying substitutions for rule-${RULE_NUM} (org: ${RULE_ORG}, version: ${VERSION})"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/package-rule-rc.yml around lines 94 - 147, Validate the
rule_number input before using RULE_NUM/RULE_DIR: ensure RULE_NUM is non-empty
and matches an expected numeric pattern (e.g., only digits) and fail early with
a clear error if it doesn't; add this check immediately after RULE_NUM="${{
inputs.rule_number }}" and before any sed/grep/file access so the subsequent
uses in sed -i "...rule-${RULE_NUM}..." and file path construction
RULE_DIR="rule-executer-${{ inputs.rule_number }}" are safe, and return a
non-zero exit if the regex test (e.g., ^[0-9]+$) fails.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/gpg-verify.yml:
- Around line 30-33: Remove the lines that write GITHUB_TOKEN and
GITHUB_REPOSITORY into GITHUB_ENV; do not persist secrets to the environment
file. Instead, stop exporting GITHUB_TOKEN (GH_TOKEN) to GITHUB_ENV and pass the
token into the verification step via a step-level env: block (use the secret
directly, e.g., GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}), and rely on the
runner-provided GITHUB_REPOSITORY (do not write GH_REPO to GITHUB_ENV); update
any steps that referenced the env file to read the token from the step-level env
and the repo from the default GITHUB_REPOSITORY variable.

In @.github/workflows/njsscan.yml:
- Around line 41-47: The upload step's conditional uses steps.njsscan.outcome
which is set before continue-on-error and causes SARIF to be skipped when
njsscan finds issues; update the upload step condition to check
steps.njsscan.conclusion instead (or use a more permissive expression like
always() && steps.njsscan.outcome != 'skipped') so the GitHub SARIF upload runs
when the job is allowed to continue-on-error but not when the scan was skipped;
modify the `if:` on the Upload njsscan report step accordingly and keep the step
name/uses (Upload njsscan report / github/codeql-action/upload-sarif) unchanged.

---

Nitpick comments:
In @.github/workflows/njsscan.yml:
- Line 46: The workflow pins github/codeql-action/upload-sarif to v4.35.1 which
mismatches the dockerfile-linter.yml pin to v3; update the uses line
(github/codeql-action/upload-sarif@60168ffe96596fce55ee3851b6bb7b2e1ea8dbb0) to
the same major version used in dockerfile-linter.yml (or vice versa) so both
workflows reference the same major tag (e.g., change to
github/codeql-action/upload-sarif@v3 or update the other workflow to v4) to
ensure consistent action versions across workflows.

In @.github/workflows/package-rule-rc.yml:
- Around line 94-147: Validate the rule_number input before using
RULE_NUM/RULE_DIR: ensure RULE_NUM is non-empty and matches an expected numeric
pattern (e.g., only digits) and fail early with a clear error if it doesn't; add
this check immediately after RULE_NUM="${{ inputs.rule_number }}" and before any
sed/grep/file access so the subsequent uses in sed -i "...rule-${RULE_NUM}..."
and file path construction RULE_DIR="rule-executer-${{ inputs.rule_number }}"
are safe, and return a non-zero exit if the regex test (e.g., ^[0-9]+$) fails.

In @.github/workflows/package-rule.yml:
- Around line 97-120: The workflow uses RULE_NUM (RULE_DIR, RULE_ORG, and the
sed substitutions) without validating the input RULE_NUMBER, which can break sed
patterns and paths; add an early validation step that checks RULE_NUM matches
the expected zero-padded numeric format (e.g., a regex like three digits) and
exits with an error if it doesn't, before constructing RULE_DIR or running the
sed commands, and update the error message to include the invalid RULE_NUMBER
and expected format so the step fails fast and clearly.
- Around line 185-217: The Slack step "Send Slack notification" constructs JSON
via string interpolation which can break if inputs.rule_number or
steps.rule_version.outputs.VERSION contain quotes/special chars; change the step
to build the payload safely (e.g., use jq or printf with proper escaping) and
pass the resulting JSON to curl via SLACK_PAYLOAD or stdin; update references to
rule-${{ inputs.rule_number }} and ${{ steps.rule_version.outputs.VERSION }} so
they are fed into jq (or an escaped here-doc) rather than concatenated into raw
JSON in the run script.
🪄 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: CHILL

Plan: Pro

Run ID: 5a7f602b-3b46-46be-8c2c-7df8fad7e8e2

📥 Commits

Reviewing files that changed from the base of the PR and between fe7e4c0 and 1e16b5a.

📒 Files selected for processing (8)
  • .github/workflows/codacy.yml
  • .github/workflows/dco-check.yml
  • .github/workflows/dockerfile-linter.yml
  • .github/workflows/gpg-verify.yml
  • .github/workflows/njsscan.yml
  • .github/workflows/package-rule-rc.yml
  • .github/workflows/package-rule.yml
  • .github/workflows/sbom.yml
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/codacy.yml
  • .github/workflows/sbom.yml

Comment on lines +30 to +33
printf 'PR_HEAD_SHA=%s\n' "$PR_HEAD_SHA" >> "$GITHUB_ENV"
printf 'PR_BASE_SHA=%s\n' "$PR_BASE_SHA" >> "$GITHUB_ENV"
printf 'GITHUB_TOKEN=%s\n' "$GH_TOKEN" >> "$GITHUB_ENV"
printf 'GITHUB_REPOSITORY=%s\n' "$GH_REPO" >> "$GITHUB_ENV"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Avoid writing secrets to GITHUB_ENV.

Writing GITHUB_TOKEN to $GITHUB_ENV (line 32) persists the secret in a file, which is less secure than passing it via step-level env: blocks. GitHub's security guidance recommends against storing secrets in GITHUB_ENV.

Additionally, GITHUB_REPOSITORY (line 33) is already available as a default environment variable in GitHub Actions runners, making this write redundant.

🛡️ Suggested fix: Pass token directly to the verification step

Remove the token from GITHUB_ENV and pass it via step-level env::

      run: |
        printf 'PR_HEAD_SHA=%s\n' "$PR_HEAD_SHA" >> "$GITHUB_ENV"
        printf 'PR_BASE_SHA=%s\n' "$PR_BASE_SHA" >> "$GITHUB_ENV"
-       printf 'GITHUB_TOKEN=%s\n' "$GH_TOKEN" >> "$GITHUB_ENV"
-       printf 'GITHUB_REPOSITORY=%s\n' "$GH_REPO" >> "$GITHUB_ENV"

    - name: Check GPG verification status  # Step to check each commit for GPG signature verification
+     env:
+       GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      run: |

GITHUB_REPOSITORY can be used directly without export as it's a default variable.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/gpg-verify.yml around lines 30 - 33, Remove the lines that
write GITHUB_TOKEN and GITHUB_REPOSITORY into GITHUB_ENV; do not persist secrets
to the environment file. Instead, stop exporting GITHUB_TOKEN (GH_TOKEN) to
GITHUB_ENV and pass the token into the verification step via a step-level env:
block (use the secret directly, e.g., GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN
}}), and rely on the runner-provided GITHUB_REPOSITORY (do not write GH_REPO to
GITHUB_ENV); update any steps that referenced the env file to read the token
from the step-level env and the repo from the default GITHUB_REPOSITORY
variable.

Comment on lines +41 to +47
continue-on-error: true
uses: ajinabraham/njsscan-action@d58d8b2f26322cd35a9efb8003baac517f226d81
with:
args: '. --sarif --output results.sarif || true'
args: '. --sarif --output results.sarif'
- name: Upload njsscan report
uses: github/codeql-action/upload-sarif@v3
uses: github/codeql-action/upload-sarif@60168ffe96596fce55ee3851b6bb7b2e1ea8dbb0 # v4.35.1
if: steps.njsscan.outcome == 'success'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

SARIF upload will be skipped when njsscan finds vulnerabilities.

The combination of continue-on-error: true (line 41) with if: steps.njsscan.outcome == 'success' (line 47) creates a logic flaw:

  • When njsscan finds vulnerabilities, it may exit non-zero
  • outcome reflects the result before continue-on-error is applied (so outcome = 'failure')
  • conclusion reflects the result after continue-on-error is applied (so conclusion = 'success')
  • The condition checks outcome, which will be 'failure', causing the SARIF upload to be skipped

This means security findings won't be uploaded to GitHub's Code Scanning dashboard.

🐛 Proposed fix: use `conclusion` instead of `outcome`
    - name: Upload njsscan report
      uses: github/codeql-action/upload-sarif@60168ffe96596fce55ee3851b6bb7b2e1ea8dbb0  # v4.35.1
-     if: steps.njsscan.outcome == 'success'
+     if: steps.njsscan.conclusion == 'success'
      with:
        sarif_file: results.sarif
        category: njsscan

Alternatively, if you want to upload regardless of scan result (but not when skipped):

if: always() && steps.njsscan.outcome != 'skipped'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/njsscan.yml around lines 41 - 47, The upload step's
conditional uses steps.njsscan.outcome which is set before continue-on-error and
causes SARIF to be skipped when njsscan finds issues; update the upload step
condition to check steps.njsscan.conclusion instead (or use a more permissive
expression like always() && steps.njsscan.outcome != 'skipped') so the GitHub
SARIF upload runs when the job is allowed to continue-on-error but not when the
scan was skipped; modify the `if:` on the Upload njsscan report step accordingly
and keep the step name/uses (Upload njsscan report /
github/codeql-action/upload-sarif) unchanged.

Signed-off-by: Sandy-at-Tazama <Sandy-at-Tazama@users.noreply.github.com>
ci: sync workflows from central-workflows
@github-actions github-actions Bot added enhancement and removed type: feature request New feature or request build labels May 5, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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/branch-target-check.yml:
- Around line 30-31: The current workflow conditional (if: github.actor !=
'dependabot[bot]' && github.actor != 'dependabot-preview[bot]') can be bypassed
by fork contributors naming their branch `dev` because github.head_ref is the
fork branch name; update the workflow file header comment to explicitly state
that this branch-name check is a developer experience guardrail and not a
security boundary, and add guidance that repository-level branch protection
rules (e.g., "Require a pull request before merging" and push restrictions) must
be configured on main to enforce actual security; mention the relevant
expressions (`github.head_ref`, `github.actor`) in the comment so readers
understand the limitation.
- Line 37: The branch check using SOURCE currently uses the overly-permissive
glob release/v[0-9]*; update the conditional to use an anchored ERE so only
dot-separated version segments match. Replace the condition that references
SOURCE (the line with [[ "$SOURCE" == "dev" || "$SOURCE" == release/v[0-9]* ]])
with a regex match like [[ "$SOURCE" == "dev" || "$SOURCE" =~
^release/v[0-9]+(\.[0-9]+)*$ ]] so branches such as release/v1 or release/v1.2.3
match but release/v1/anything or release/v2-hotfix do not.
🪄 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: CHILL

Plan: Pro

Run ID: 539a2fd5-8076-4be6-8a3e-b060f8677760

📥 Commits

Reviewing files that changed from the base of the PR and between 1e16b5a and 4d8326d.

📒 Files selected for processing (3)
  • .github/workflows/branch-target-check.yml
  • .github/workflows/package-rule-rc.yml
  • .github/workflows/package-rule.yml
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/package-rule-rc.yml
  • .github/workflows/package-rule.yml

Comment on lines +30 to +31
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
runs-on: ubuntu-latest
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fork contributors can bypass this check by naming their branch dev.

Since github.head_ref is the branch name in the fork, a contributor can create a branch named dev in their fork, open a PR targeting main, and this check will pass. This is a structural limitation of branch-name-based enforcement — it does not replace branch protection rules on the base repository.

This is acceptable as long as branch protection rules (e.g. "Require a pull request before merging", "Restrict who can push") are configured on main in addition to this workflow check. Consider adding a note to the header comment clarifying that this check is a DX guardrail, not a security boundary.

🤖 Prompt for 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.

In @.github/workflows/branch-target-check.yml around lines 30 - 31, The current
workflow conditional (if: github.actor != 'dependabot[bot]' && github.actor !=
'dependabot-preview[bot]') can be bypassed by fork contributors naming their
branch `dev` because github.head_ref is the fork branch name; update the
workflow file header comment to explicitly state that this branch-name check is
a developer experience guardrail and not a security boundary, and add guidance
that repository-level branch protection rules (e.g., "Require a pull request
before merging" and push restrictions) must be configured on main to enforce
actual security; mention the relevant expressions (`github.head_ref`,
`github.actor`) in the comment so readers understand the limitation.

env:
SOURCE: ${{ github.head_ref }}
run: |
if [[ "$SOURCE" == "dev" || "$SOURCE" == release/v[0-9]* ]]; then
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Bash glob release/v[0-9]* is more permissive than intended.

In bash [[ ]] pattern matching, * matches any string including /, so branches like release/v1/anything or release/v2-hotfix would pass the check. The documentation comments (lines 7, 13) describe the intent as release/v<N>.* (e.g. release/v1.2), meaning a dot-separated version after the major number. Consider tightening the glob to match the documented contract:

🔧 Proposed tighter pattern
-          if [[ "$SOURCE" == "dev" || "$SOURCE" == release/v[0-9]* ]]; then
+          if [[ "$SOURCE" == "dev" || "$SOURCE" == release/v[0-9]*([0-9.])[0-9] ]]; then

Or, if you want to permit release/v1, release/v1.2, release/v1.2.3, etc., a simpler and readable approach:

-          if [[ "$SOURCE" == "dev" || "$SOURCE" == release/v[0-9]* ]]; then
+          if [[ "$SOURCE" == "dev" ]] || [[ "$SOURCE" =~ ^release/v[0-9]+(\.[0-9]+)*$ ]]; then

The =~ operator in [[ ]] uses ERE (extended regular expressions), which is more expressive and anchored with ^/$ to prevent partial matches.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if [[ "$SOURCE" == "dev" || "$SOURCE" == release/v[0-9]* ]]; then
if [[ "$SOURCE" == "dev" ]] || [[ "$SOURCE" =~ ^release/v[0-9]+(\.[0-9]+)*$ ]]; then
🤖 Prompt for 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.

In @.github/workflows/branch-target-check.yml at line 37, The branch check using
SOURCE currently uses the overly-permissive glob release/v[0-9]*; update the
conditional to use an anchored ERE so only dot-separated version segments match.
Replace the condition that references SOURCE (the line with [[ "$SOURCE" ==
"dev" || "$SOURCE" == release/v[0-9]* ]]) with a regex match like [[ "$SOURCE"
== "dev" || "$SOURCE" =~ ^release/v[0-9]+(\.[0-9]+)*$ ]] so branches such as
release/v1 or release/v1.2.3 match but release/v1/anything or release/v2-hotfix
do not.

Signed-off-by: Justus-at-Tazama <Justus-at-Tazama@users.noreply.github.com>
ci: sync workflows from central-workflows
Signed-off-by: Sandy-at-Tazama <Sandy-at-Tazama@users.noreply.github.com>
ci: sync workflows from central-workflows [skip ci]
Justus-at-Tazama and others added 3 commits May 6, 2026 14:01
Signed-off-by: Justus-at-Tazama <Justus-at-Tazama@users.noreply.github.com>
ci: sync workflows from central-workflows [skip ci]
* fix: frms version

* fix: bump frms-coe-lib to 8.0.0-rc.1

* fix: bump frms-coe-startup-lib to 3.0.2-rc.3

* fix: defensive else-branch, root-export import, ESLint bump, dependabot target-branch

- src/logic.service.ts: if/if chain replaced with if/else if/else; let transactionId
  uninitialised to enforce TypeScript definite assignment; explicit loggerService.error
  and return on unrecognised transaction type; import moved to frms-coe-lib root export
- __tests__/unit/logic.service.test.ts: unsupported-type test added (35 -> 36 tests)
- package.json: eslint bumped from ^9.36.0 to ^9.39.4 (fixes unified-signatures crash)
- .github/dependabot.yml: target-branch set to dev

Closes #401

---------

Co-authored-by: Justus-at-Tazama <jortlepp@contractor.linuxfoundation.org>
Comment thread Dockerfile
ARG GH_TOKEN

RUN npm ci --ignore-scripts
RUN --mount=type=secret,id=GH_TOKEN,env=GH_TOKEN npm ci --ignore-scripts

jobs:
encoding-check:
permissions:
@Justus-at-Tazama
Copy link
Copy Markdown
Contributor

Stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants