fix: prototype pollution vulnerability in parse-git-config (#15242)

Fixes [Dependabot Alert
203](https://github.com/twentyhq/twenty/security/dependabot/203) -
prototype pollution vulnerability in parse-git-config.

parse-git-config was a dependency for danger@11.3.1, but danger@13.0.4
does not depend on it.
This commit is contained in:
Abdullah.
2025-10-22 14:42:24 +05:00
committed by GitHub
parent 226cc9eb74
commit d593eb134b
3 changed files with 317 additions and 133 deletions
@@ -1,11 +1,11 @@
import { danger } from 'danger';
const ordinalSuffix = (number) => {
const ordinalSuffix = (number: number) => {
const v = number % 100;
if (v === 11 || v === 12 || v === 13) {
return number + 'th';
}
const suffixes = { 1: 'st', 2: 'nd', 3: 'rd' };
const suffixes: Record<number, string> = { 1: 'st', 2: 'nd', 3: 'rd' };
return number + (suffixes[v % 10] || 'th');
};