From 20cc6e0c1fc87b4bea42f5d96badd1666ac58574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MARQUET?= <72651575+BreizhHardware@users.noreply.github.com> Date: Tue, 24 Feb 2026 09:01:06 +0000 Subject: [PATCH 1/2] fix(audit): prevent duplicate security audit issue creation --- .github/workflows/audit.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 46f457b..fd43a83 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -38,7 +38,19 @@ jobs: uses: actions/github-script@v8 with: script: | - github.rest.issues.create({ + const issues = await github.rest.issues.listForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open', + labels: 'security,audit' + }); + + if (issues.data.length > 0) { + console.log('An open security audit issue already exists. Skipping creation.'); + return; + } + + await github.rest.issues.create({ owner: context.repo.owner, repo: context.repo.repo, title: 'Security Audit Failed', From 85b10ce01654805212ca78f0f550c90392ed7daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MARQUET?= <72651575+BreizhHardware@users.noreply.github.com> Date: Tue, 24 Feb 2026 10:04:46 +0100 Subject: [PATCH 2/2] Update .github/workflows/audit.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/audit.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index fd43a83..9ab2ae3 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -45,7 +45,9 @@ jobs: labels: 'security,audit' }); - if (issues.data.length > 0) { + const openIssues = issues.data.filter(issue => !issue.pull_request); + + if (openIssues.length > 0) { console.log('An open security audit issue already exists. Skipping creation.'); return; }