Skip to content

feat(ci): compare lists of packages to deliver to testing repositories (#3206)#3209

Draft
mushroomempires wants to merge 14 commits into
dev-25.10.xfrom
MON-195796-dev-25.10.x
Draft

feat(ci): compare lists of packages to deliver to testing repositories (#3206)#3209
mushroomempires wants to merge 14 commits into
dev-25.10.xfrom
MON-195796-dev-25.10.x

Conversation

@mushroomempires

@mushroomempires mushroomempires commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes # MON-195796

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software
  • Updating documentation (missing information, typo...)

Target serie

  • 23.10.x
  • 24.04.x
  • 24.10.x
  • 25.10.x
  • master

How this pull request can be tested ?

Please describe the procedure to verify that the goal of the PR is matched. Provide clear instructions so that it can be correctly tested.

Any relevant details of the configuration to perform the test should be added.

Checklist

  • I have followed the coding style guidelines provided by Centreon
  • I have commented my code, especially new classes, functions or any legacy code modified. (docblock)
  • I have commented my code, especially hard-to-understand areas of the PR.
  • I have made corresponding changes to the documentation.
  • I have rebased my development branch on the base branch (master, maintenance).

Summary by Aikido

⚠️ Security Issues: 4 Quality Issues: 0 ✅ Resolved Issues: 2

⚡ Enhancements

  • Stored list of restored DEB and RPM packages to text files
  • Added comparison step to verify delivered packages matched restored lists
  • Redirected root repository paths for DEB and RPM deliveries to test-specific

More info

@coderabbitai

coderabbitai Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d2ea380a-1785-4fa0-8cdd-fc8d811799a1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch MON-195796-dev-25.10.x
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can approve the review once all CodeRabbit's comments are resolved.

Enable the reviews.request_changes_workflow setting to automatically approve the review once all CodeRabbit's comments are resolved.

@mushroomempires mushroomempires marked this pull request as ready for review March 3, 2026 15:07
@mushroomempires mushroomempires requested a review from a team as a code owner March 3, 2026 15:07
@mushroomempires mushroomempires requested review from kduret and tuntoja and removed request for a team March 3, 2026 15:07
@mushroomempires mushroomempires marked this pull request as draft March 3, 2026 15:22
@mushroomempires mushroomempires marked this pull request as ready for review March 6, 2026 10:19
tuntoja
tuntoja previously approved these changes Mar 6, 2026
Comment on lines 59 to +145
@@ -85,7 +93,8 @@ runs:
ROOT_REPO_PATH_SUFFIX="-internal"
fi

ROOT_REPO_PATH="${ROOT_REPO_PATH_PREFIX}standard${ROOT_REPO_PATH_SUFFIX}"
ROOT_REPO_PATH="${ROOT_REPO_PATH_PREFIX}kdu${ROOT_REPO_PATH_SUFFIX}"
echo "root_repo_path=$ROOT_REPO_PATH" >> $GITHUB_OUTPUT

# Cleanup (equivalent to --sync-deletes done with RPMs)
# This is a workaround the fact that jfrog cli does not allow upload
@@ -133,4 +142,18 @@ runs:
done

curl -H "Authorization: Bearer ${{ inputs.artifactory_token }}" -X POST "https://centreon.jfrog.io/artifactory/api/deb/reindex/$ROOT_REPO_PATH?async=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.

Template Injection in GitHub Workflows Action - critical severity
A GitHub Actions workflow step contains a template expression referencing potentially untrusted GitHub context fields. This may allow malicious input to be injected into shell commands, leading to a potential supply chain attack as tokens of the CI/CD pipeline could be exfiltrated.

Show fix

Remediation: Review your GitHub Actions workflow for any template expressions that interpolate GitHub context values, especially those ending with unsafe suffixes such as 'body', 'title', 'email', 'head_ref', etc. Sanitize or validate these inputs before use, or refactor the workflow to avoid directly embedding untrusted data in shell commands.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

Comment on lines +149 to +159
run: |
DELIVERED_PACKAGES=$(jf rt search "${{ steps.publish-debs.outputs.root_repo_path }}/pool/${{ inputs.version }}/${{ inputs.stability }}/${{ inputs.release_type }}/${{ inputs.module_name }}/*.deb" | jq -r '.[].path | split("/") | last')
ORIGINAL_PACKAGES=$(cat deb_packages.txt)
MISSING_PACKAGES=0
for PACKAGE in $ORIGINAL_PACKAGES; do
if ! echo "$DELIVERED_PACKAGES" | grep -q "$(basename "$PACKAGE")"; then
echo "::error::[${{ github.job }}] Package $PACKAGE was not successfully delivered or found in repository."
MISSING_PACKAGES=1
fi
done
[[ $MISSING_PACKAGES -eq 0 ]] || exit 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Template Injection in GitHub Workflows Action - critical severity
A GitHub Actions workflow step contains a template expression referencing potentially untrusted GitHub context fields. This may allow malicious input to be injected into shell commands, leading to a potential supply chain attack as tokens of the CI/CD pipeline could be exfiltrated.

Show fix

Remediation: Review your GitHub Actions workflow for any template expressions that interpolate GitHub context values, especially those ending with unsafe suffixes such as 'body', 'title', 'email', 'head_ref', etc. Sanitize or validate these inputs before use, or refactor the workflow to avoid directly embedding untrusted data in shell commands.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

Comment on lines +189 to +200
run: |
DELIVERED_PACKAGES=$(jf rt search "${{ steps.publish-rpms.outputs.root_repo_path }}/${{ inputs.version }}/${{ inputs.distrib }}/${{ inputs.stability }}-${{ inputs.release_type }}/${{ inputs.module_name }}/*.rpm" | jq -r '.[].path | split("/") | last')
ORIGINAL_PACKAGES=$(cat rpm_packages.txt)
MISSING_PACKAGES=0
for PACKAGE in $ORIGINAL_PACKAGES; do
if ! echo "$DELIVERED_PACKAGES" | grep -q "$(basename "$PACKAGE")"; then
echo "::error::[${{ github.job }}] Package $PACKAGE was not successfully delivered or found in repository."
MISSING_PACKAGES=1
continue
fi
done
[[ $MISSING_PACKAGES -eq 0 ]] || exit 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Template Injection in GitHub Workflows Action - critical severity
A GitHub Actions workflow step contains a template expression referencing potentially untrusted GitHub context fields. This may allow malicious input to be injected into shell commands, leading to a potential supply chain attack as tokens of the CI/CD pipeline could be exfiltrated.

Show fix

Remediation: Review your GitHub Actions workflow for any template expressions that interpolate GitHub context values, especially those ending with unsafe suffixes such as 'body', 'title', 'email', 'head_ref', etc. Sanitize or validate these inputs before use, or refactor the workflow to avoid directly embedding untrusted data in shell commands.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

@Tpo76

Tpo76 commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

🤖 This is an automatic comment generated by an internal tool.

Complexity Classification: Standard

Justification: Automatic classification failed; defaulting to standard.

Metric Value
WIP Points 2
SLA Track Standard SLA (2 work days)
First review SLA 1 work day

A maintainer can override this classification at any time.

@kduret kduret marked this pull request as draft April 21, 2026 14:56
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.

3 participants