Skip to content

CTOR-2244 [apps::atlassian::statuspage] - new plugin#6073

Open
garnier-quentin wants to merge 19 commits intocentreon:developfrom
garnier-quentin:CTOR-2244-atlassian-statuspage
Open

CTOR-2244 [apps::atlassian::statuspage] - new plugin#6073
garnier-quentin wants to merge 19 commits intocentreon:developfrom
garnier-quentin:CTOR-2244-atlassian-statuspage

Conversation

@garnier-quentin
Copy link
Copy Markdown
Contributor

@garnier-quentin garnier-quentin commented Mar 26, 2026

Community contributors

Description

New plugin to Atlassian statuspage with json public files

CTOR-2244

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Functionality enhancement or optimization (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software

How this pull request can be tested ?

$ perl centreon_plugins.pl --plugin=apps::atlassian::statuspage::plugin --mode=components --hostname='status.api.video' --verbose
OK: All components are ok
Component 'Video On Demand' status: operational
Component 'Live Streaming' status: operational
Component 'User space' status: operational
Component 'Web services' status: operational
Component 'Video Player' status: operational

Checklist

  • I have followed the coding style guidelines provided by Centreon
  • I have commented my code, especially hard-to-understand areas of the PR.
  • I have rebased my development branch on the base branch (develop).
  • I have provide data or shown output displaying the result of this code in the plugin area concerned.

Summary by Aikido

Security Issues: 0 🔍 Quality Issues: 1 Resolved Issues: 0

🚀 New Features

  • Added Centreon plugin for Atlassian Statuspage with components and packaging

More info

foreach (@{$results->{components}}) {
next if (defined($self->{option_results}->{filter_component_id}) && $self->{option_results}->{filter_component_id} ne '' &&
$_->{id} !~ /$self->{option_results}->{filter_component_id}/);
next if (defined($self->{option_results}->{filter_component_name}) && $self->{option_results}->{filter_component_name} ne '' &&
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

User-supplied --filter-component-name is interpolated directly into a regex ( $_->{name} !~ /$self->{option_results}->{filter_component_name}/ ). Validate or escape the input before using it in a regex to avoid regex injection/DoS.

Details

✨ AI Reasoning
​The code builds regular expressions directly from values that can be provided by users (CLI options). Direct interpolation into regex literals can allow crafted input to change matching behavior, cause runtime errors, or trigger catastrophic backtracking. The problematic expressions are used for filtering and are not sanitized or validated. This was introduced by the new component filtering logic that applies these option values directly into regex matches.

🔧 How do I fix it?
Use parameterized queries with placeholders, array-based command execution (no shell interpretation), or properly escaped arguments using vetted libraries. Avoid dynamic queries/commands built with user input concatenation.

Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The goal of that option is to used regexp. If we escape regexp, we cant use regexp. That alert is not very smart in our context i think.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants