Create config file and pass to l7 proxy#452
Conversation
| id: 1, | ||
| name: "Default", | ||
| }, | ||
| ecosystems: { |
There was a problem hiding this comment.
The npm and pypi blocks in getConfigContent() are near-identical; consolidate to a single generator to avoid duplicated config logic (e.g., a helper that builds an ecosystem entry using cutoff).
Details
✨ AI Reasoning
The new module builds a JSON config with two ecosystem entries (npm and pypi) that are structurally and logically identical: same keys and same values computed from cutoff. This duplicates non-trivial configuration logic within the same function and file, increasing maintenance burden because updates to one ecosystem’s config would need to be mirrored in the other.
🔧 How do I fix it?
Delete extra code. Extract repeated code sequences into reusable functions or methods. Use loops or data structures to eliminate repetitive patterns.
Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
Summary by Aikido
🚀 New Features
⚡ Enhancements
More info