CTOR-2266 [apps::saas::apivideo::restapi] - new plugin#6111
CTOR-2266 [apps::saas::apivideo::restapi] - new plugin#6111garnier-quentin wants to merge 21 commits intocentreon:developfrom
Conversation
| sub get_connection_info { | ||
| my ($self, %options) = @_; | ||
|
|
||
| return md5_hex($self->{option_results}->{hostname} . ':' . $self->{option_results}->{port} . ':' . $self->{option_results}->{api_key}); |
There was a problem hiding this comment.
get_connection_info uses md5_hex over hostname:port:api_key. Avoid MD5 for values derived from secrets; use a stronger hash (e.g., SHA-256) or a secure identifier mechanism.
Details
✨ AI Reasoning
The code computes an MD5 hash over the API key combined with host/port to create a connection identifier. This hash is derived from a secret (the API key) and is used in authentication-related cache logic (connection identification). Using MD5 for data derived from secrets poses a cryptographic risk: MD5 is broken and should not be used where secrets or authentication-related values are involved. A stronger hash (e.g., SHA-256) should be used for general hashing of secrets, or the secret should be stored/compared using a secure mechanism appropriate to the sensitivity and usage pattern.
🔧 How do I fix it?
Use modern alternatives: SHA-256/SHA-3 for general hashing, and bcrypt/scrypt/Argon2 (with salt and work factor) for passwords
Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
Community contributors
Description
New plugin to monitor Api Video (https://docs.api.video/reference/authentication-guide)
CTOR-2266
Type of change
How this pull request can be tested ?
Checklist
Summary by Aikido
🚀 New Features
⚡ Enhancements
More info