Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
86020a3
docs(audit): auditoria exaustiva 2026-05-23 — status de bugs e falhas
claude May 23, 2026
1160f3b
fix(test): rename PascalCase params em AdminStandardRules.test.tsx (E…
claude May 23, 2026
94577a9
refactor(onboarding): add useOptionalOnboardingContext + elimina 3 em…
claude May 23, 2026
964518e
fix(test): tipa explicitamente SnapshotCase em PriceFreshnessBadge
claude May 23, 2026
285cd22
chore(eslint): regenerar baseline para capitalizar drift positivo (Et…
claude May 23, 2026
c9ab4a2
ci(actions): bump checkout v4→v5, setup-node v4→v6, upload-artifact v…
claude May 23, 2026
5876bfc
chore(eslint): apply T-FIX-5 proposed config + check:proposed-configs…
claude May 23, 2026
fab293b
docs(operations): POP de cadastro de secrets externos (Etapa 6/20, Is…
claude May 23, 2026
e5632a1
feat(observability): validateUrlFormat em connection-test-runner (Eta…
claude May 23, 2026
307ddfd
test(observability): suite Deno para validateUrlFormat (Etapa 8/20, I…
claude May 23, 2026
6250622
test(quotes): remove forEach vazio em QuoteBuilderStepper.test.tsx (E…
claude May 23, 2026
17a16d3
test(scenario): corrige Scenario 2 CIF/FOB para refletir schema real …
claude May 23, 2026
3a0fbea
docs(status): refresh + adendo na auditoria após 11/20 etapas (Etapa …
claude May 23, 2026
24735c9
fix(test): força TZ=America/Sao_Paulo nos scripts vitest (Etapa 21/20…
claude May 23, 2026
5ac4322
test(fix): add useOptionalOnboardingContext aos mocks (Etapa 22/20 — …
claude May 23, 2026
c70585d
test(fix): NotificationDrawer mocks usam path real do hook (Etapa 23/20)
claude May 23, 2026
fda7a54
test(fix): rotas redirect /login → /auth nos 4 *Route tests (Etapa 24…
claude May 23, 2026
c4f5ae5
test(fix): admin tests também /login → /auth (Etapa 25/20)
claude May 23, 2026
ba5798b
test(skip): useCatalogState.unit — OOM por cascata Supabase (Etapa 26…
claude May 23, 2026
4b64fd5
test(fix): add OrganizationProvider ao wrapper de syntax-integrity (E…
claude May 23, 2026
1953e4d
docs(status): registra Etapas 21-27 (correções pós-CI) — finaliza ses…
claude May 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 4 additions & 34 deletions .eslint-baseline.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{
"generatedAt": "2026-05-22T03:12:40.396Z",
"totalErrors": 473,
"generatedAt": "2026-05-23T00:33:24.495Z",
"totalErrors": 442,
"counts": {
"src/components/access/DevAccessDeniedPage.tsx": {
"react-hooks/exhaustive-deps": 1
},
"src/components/admin/OwnershipRepairDialog.tsx": {
"@typescript-eslint/naming-convention": 1
},
"src/components/admin/connections/ConnectionTestDetailsDialog.tsx": {
"no-duplicate-imports": 1
},
"src/components/admin/connections/ConnectionTestHistoryPanel.tsx": {
"@typescript-eslint/no-non-null-assertion": 1
},
Expand Down Expand Up @@ -184,11 +181,7 @@
"@typescript-eslint/naming-convention": 1
},
"src/components/common/EnhancedSpotlight.tsx": {
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/no-unused-vars": 1,
"no-empty": 1,
"react-hooks/exhaustive-deps": 2,
"react-hooks/rules-of-hooks": 1
"react-hooks/exhaustive-deps": 2
},
"src/components/compare/ComparisonDuelView.tsx": {
"@typescript-eslint/no-unused-vars": 1
Expand Down Expand Up @@ -364,22 +357,12 @@
"src/components/layout/GlobalOverlay.tsx": {
"@typescript-eslint/no-unused-vars": 4
},
"src/components/layout/Header.tsx": {
"@typescript-eslint/no-unused-vars": 9
},
"src/components/layout/MainLayout.tsx": {
"@typescript-eslint/no-unused-vars": 2,
"react-hooks/exhaustive-deps": 1
},
"src/components/layout/SidebarReorganized.tsx": {
"@typescript-eslint/no-unused-vars": 5
},
"src/components/layout/sidebar/SidebarBrandHeader.tsx": {
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/no-unused-vars": 1,
"no-empty": 1,
"react-hooks/rules-of-hooks": 1
},
"src/components/layout/sidebar/SidebarNavGroup.tsx": {
"react-hooks/exhaustive-deps": 1
},
Expand Down Expand Up @@ -869,11 +852,7 @@
"@typescript-eslint/no-unused-vars": 1
},
"src/components/ui/ShortcutsHelpDialog.tsx": {
"@typescript-eslint/naming-convention": 1,
"@typescript-eslint/no-explicit-any": 2,
"@typescript-eslint/no-unused-vars": 1,
"no-empty": 1,
"react-hooks/rules-of-hooks": 1
"@typescript-eslint/naming-convention": 1
},
"src/components/ui/currency-input.tsx": {
"@typescript-eslint/no-explicit-any": 1
Expand All @@ -884,9 +863,6 @@
"src/components/ui/stat-card.tsx": {
"@typescript-eslint/naming-convention": 2
},
"src/contexts/AuthContext.test.tsx": {
"@typescript-eslint/consistent-type-imports": 1
},
"src/contexts/AuthContext.tsx": {
"@typescript-eslint/no-explicit-any": 2,
"@typescript-eslint/no-unused-vars": 7
Expand Down Expand Up @@ -1250,9 +1226,6 @@
"react-hooks/exhaustive-deps": 1
},
"src/pages/system/SystemStatusPage.tsx": {
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/no-non-null-assertion": 1,
"@typescript-eslint/no-unused-vars": 4,
"react-hooks/exhaustive-deps": 1
},
"src/pages/tools/AdvancedPriceSearchPage.tsx": {
Expand Down Expand Up @@ -1290,9 +1263,6 @@
"@typescript-eslint/no-explicit-any": 5,
"no-console": 1
},
"src/tests/AdminLayout.test.tsx": {
"@typescript-eslint/no-explicit-any": 1
},
"src/tests/AdminMobileInteraction.test.tsx": {
"@typescript-eslint/no-unused-vars": 1
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/branch-protection-sentinel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
name: Verify push to main matches accepted patterns
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/branch-protection-sentinel.yml"
if [ ! -f "$FILE" ]; then
  echo "Missing file: $FILE" >&2
  exit 1
fi

echo "== File: $FILE =="
nl -ba "$FILE" | sed -n '1,120p'
echo
echo "== uses no arquivo =="
rg -n "^\s*-\s*uses:\s*" "$FILE" || true

echo
echo "== uses com SHA (contains @<40-hex>) =="
rg -n "^\s*-\s*uses:\s*[^@]+@([0-9a-f]{40}|[0-9a-f]{64})\b" "$FILE" || true

echo
echo "== uses por tag (contains `@v`) =="
rg -n "^\s*-\s*uses:\s*[^@]+@v[0-9A-Za-z\.\-]*\b" "$FILE" || true

Repository: adm01-debug/promo-gifts-v4

Length of output: 193


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/branch-protection-sentinel.yml"
if [ ! -f "$FILE" ]; then
  echo "Missing file: $FILE" >&2
  exit 1
fi

echo "== File: $FILE =="
awk '{printf "%6d\t%s\n", NR, $0}' "$FILE" | sed -n '1,140p'
echo
echo "== uses no arquivo =="
rg -n "^\s*-\s*uses:\s*" "$FILE" || true
echo
echo "== uses com SHA (40 ou 64 hex) =="
rg -n "^\s*-\s*uses:\s*[^@]+@([0-9a-f]{40}|[0-9a-f]{64})\b" "$FILE" || true
echo
echo "== uses por tag (contém `@v`) =="
rg -n "^\s*-\s*uses:\s*[^@]+@v[0-9A-Za-z\.\-]*\b" "$FILE" || true

Repository: adm01-debug/promo-gifts-v4

Length of output: 7629


Pin actions/checkout em SHA imutável.

actions/checkout@v5 está referenciado por tag (mutável), enfraquecendo a cadeia de confiança do workflow. Troque por um commit SHA fixo da release v5 (neste arquivo, esse é o único uses sem pinagem por SHA).

- uses: actions/checkout@v5
🧰 Tools
🪛 zizmor (1.25.2)

[error] 40-40: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/branch-protection-sentinel.yml at line 40, Substitua a
referência mutável actions/checkout@v5 por um pinamento imutável usando o commit
SHA da release v5; locate a linha que contém "uses: actions/checkout@v5" e
trocar o sufixo `@v5` por @<commit-sha> (o SHA correspondente à tag v5) para
garantir que o workflow use um commit fixo e não uma tag mutável.

with:
# fetch-depth: 0 → histórico completo, para auditar todos os commits do push
fetch-depth: 0
Expand Down
70 changes: 35 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:
continue-on-error: true

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
Comment on lines +33 to +35
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/ci.yml"

echo "== File exists? =="
ls -l "$FILE"

echo
echo "== Lines around 25-80 (includes 33-35) =="
nl -ba "$FILE" | sed -n '25,80p'

echo
echo "== All persist-credentials in this workflow =="
rg -n "persist-credentials\s*:" "$FILE" || true

echo
echo "== All uses: actions/checkout@* =="
rg -n "uses:\s*actions/checkout@" "$FILE" || true

echo
echo "== All uses: actions/setup-node@* =="
rg -n "uses:\s*actions/setup-node@" "$FILE" || true

echo
echo "== All uses: actions/upload-artifact@* =="
rg -n "uses:\s*actions/upload-artifact@" "$FILE" || true

echo
echo "== Checkouts with context (10 lines after each checkout) =="
rg -n "uses:\s*actions/checkout@" "$FILE" | cut -d: -f1 | while read -r line; do
  start=$((line-3))
  end=$((line+12))
  echo "--- Context for checkout at line $line ---"
  nl -ba "$FILE" | sed -n "${start},${end}p"
done

Repository: adm01-debug/promo-gifts-v4

Length of output: 269


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/ci.yml"

echo "== File exists? =="
ls -l "$FILE"

echo
echo "== Lines around 25-80 (includes 33-35) =="
awk 'NR>=25 && NR<=80 {printf "%d\t%s\n", NR, $0}' "$FILE"

echo
echo "== All persist-credentials in this workflow =="
rg -n "persist-credentials\s*:" "$FILE" || true

echo
echo "== All uses: actions/checkout@* =="
rg -n "uses:\s*actions/checkout@" "$FILE" || true

echo
echo "== All uses: actions/setup-node@* =="
rg -n "uses:\s*actions/setup-node@" "$FILE" || true

echo
echo "== All uses: actions/upload-artifact@* =="
rg -n "uses:\s*actions/upload-artifact@" "$FILE" || true

echo
echo "== Checkouts com contexto (±3 linhas antes e +12 depois) =="
rg -n "uses:\s*actions/checkout@" "$FILE" | cut -d: -f1 | while read -r line; do
  start=$((line-3))
  end=$((line+12))
  echo "--- Contexto do checkout no line $line ---"
  awk -v s="$start" -v e="$end" 'NR>=s && NR<=e {printf "%d\t%s\n", NR, $0}' "$FILE"
  echo
done

Repository: adm01-debug/promo-gifts-v4

Length of output: 11439


Endureça o workflow CI (pinagem por SHA + persist-credentials: false no checkout).

  • actions/checkout@v5, actions/setup-node@v6 e actions/upload-artifact@v5 estão sendo usados por tag (sem SHA imutável).
  • Não existe persist-credentials: false em nenhum actions/checkout do .github/workflows/ci.yml, deixando credenciais/token disponíveis no workspace para steps subsequentes.
  • Também há denoland/setup-deno@v1 por tag.
Patch sugerido (padrão para aplicar nos steps equivalentes)
-      - uses: actions/checkout@v5
+      - uses: actions/checkout@<SHA_IMUTAVEL_DA_RELEASE_V5>
+        with:
+          persist-credentials: false

-      - uses: actions/setup-node@v6
+      - uses: actions/setup-node@<SHA_IMUTAVEL_DA_RELEASE_V6>

-      - uses: actions/upload-artifact@v5
+      - uses: actions/upload-artifact@<SHA_IMUTAVEL_DA_RELEASE_V5>
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 33-33: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 33-33: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 35-35: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 33 - 35, O workflow está usando ações
por tag e não está desativando credenciais no checkout; atualize cada step que
usa actions/checkout, actions/setup-node, actions/upload-artifact e
denoland/setup-deno para apontar para a correspondente referência SHA imutável
em vez da tag (por exemplo substituir actions/checkout@v5 por
actions/checkout@<COMMIT_SHA>) e adicione persist-credentials: false a todos os
steps de actions/checkout (ex.: - uses: actions/checkout@<SHA> with:
persist-credentials: false) para evitar persistência de tokens no workspace;
aplique a mesma pinagem por SHA às referências de setup-node, upload-artifact e
denoland/setup-deno.

with:
node-version-file: '.nvmrc'

Expand All @@ -55,9 +55,9 @@ jobs:
timeout-minutes: 90

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down Expand Up @@ -189,8 +189,8 @@ jobs:
needs: quality
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: npm
Expand All @@ -207,9 +207,9 @@ jobs:
timeout-minutes: 75

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down Expand Up @@ -239,7 +239,7 @@ jobs:

- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: coverage-report-${{ github.run_id }}
path: coverage/
Expand All @@ -261,8 +261,8 @@ jobs:
runs-on: ubuntu-latest
needs: quality
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: npm
Expand All @@ -289,7 +289,7 @@ jobs:
--coverage.thresholds.branches=0
--coverage.thresholds.statements=0
- name: Upload Coverage Artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: full-coverage-report
path: coverage/
Expand All @@ -300,8 +300,8 @@ jobs:
runs-on: ubuntu-latest
needs: quality
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: npm
Expand All @@ -313,7 +313,7 @@ jobs:
run: npm run test:e2e:critical
- name: Upload E2E Report
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: playwright-report
path: playwright-report/
Expand All @@ -329,8 +329,8 @@ jobs:
runs-on: ubuntu-latest
needs: build-gate
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: npm
Expand All @@ -342,7 +342,7 @@ jobs:
run: npx playwright test e2e/flows/elite-ux-validation.spec.ts
- name: Upload Elite E2E Report
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: playwright-elite-report
path: playwright-report/
Expand All @@ -355,9 +355,9 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down Expand Up @@ -400,7 +400,7 @@ jobs:

- name: Upload ref-warning console snapshot
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: console-snapshot-ref-${{ github.run_id }}
path: |
Expand All @@ -415,9 +415,9 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down Expand Up @@ -455,7 +455,7 @@ jobs:

- name: Upload hook coverage artifact
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: hooks-coverage
path: coverage/
Expand All @@ -468,9 +468,9 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: npm
Expand Down Expand Up @@ -509,7 +509,7 @@ jobs:

- name: Upload price-freshness coverage artifact
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: price-freshness-coverage
path: coverage/
Expand All @@ -522,9 +522,9 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: npm
Expand All @@ -537,7 +537,7 @@ jobs:

- name: Upload cloud-status coverage artifact
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: cloud-status-coverage
path: coverage/
Expand All @@ -550,9 +550,9 @@ jobs:
timeout-minutes: 15

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'

Expand All @@ -574,9 +574,9 @@ jobs:
timeout-minutes: 20

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: npm
Expand All @@ -592,7 +592,7 @@ jobs:

- name: Upload Theme Validation Report
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: theme-validation-report
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== File = .github/workflows/codeql.yml =="
ls -la .github/workflows/codeql.yml || true

echo
echo "== Lines around checkout (approx 1-80) =="
nl -ba .github/workflows/codeql.yml | sed -n '1,120p'

echo
echo "== All checkout uses in the workflow =="
rg -n "uses:\s*actions/checkout@" .github/workflows/codeql.yml || true

echo
echo "== Any persist-credentials configuration =="
rg -n "persist-credentials" .github/workflows/codeql.yml || true

Repository: adm01-debug/promo-gifts-v4

Length of output: 293


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== File = .github/workflows/codeql.yml =="
sed -n '1,200p' .github/workflows/codeql.yml | cat

echo
echo "== Lines with checkout uses =="
grep -nE "uses:\s*actions/checkout@" .github/workflows/codeql.yml || true

echo
echo "== Lines with persist-credentials =="
grep -nE "persist-credentials" .github/workflows/codeql.yml || true

Repository: adm01-debug/promo-gifts-v4

Length of output: 1084


🌐 Web query:

actions/checkout v5 persist-credentials default value

💡 Result:

For actions/checkout v5, the input persist-credentials has no explicit documented boolean default; instead, the README shows the default as an empty value (persist-credentials: ''). This corresponds to the action’s default behavior of persisting credentials (token/SSH key) into the local git configuration unless you set persist-credentials: false. The documentation also states that the auth token is persisted in local git config and removed during post-job cleanup, and that you can opt out by setting persist-credentials: false [1][2].

Citations:


🌐 Web query:

GitHub Actions pin actions to commit SHA security best practice instead of v5 tag

💡 Result:

Best practice: in GitHub Actions workflows, pin the action you “use” to a full-length commit SHA (immutable reference) instead of a mutable tag like v5. GitHub documents that pinning to a full-length commit SHA is the only way to use an action as an immutable release and helps mitigate the risk of a malicious backdoor being added to the action’s repository.[1] Why v5 tags are not equivalent to SHA pinning - A tag reference such as actions/checkout@v5 is a moving, mutable Git ref; workflows that use tags can end up running different code over time if the tag is repointed (or if the action maintainer is compromised).[1] - Pinning to a commit SHA prevents silent changes because the commit SHA is immutable; the exact code state identified by that SHA is what will be executed.[1] What this looks like in YAML - Less secure (tag): - uses: actions/some-action@v5 - More secure (commit SHA): - uses: actions/some-action@ (Many teams keep the human-readable version as a comment for maintainability.)[2] How to keep SHAs up to date - Because commit SHAs are immutable, you must intentionally update pins when you want newer action versions; tools exist to automatically convert/update workflow pins to the latest SHA for a given tag.[3] Direct answer - To follow the security best practice implied by the docs, replace references like actions/@v5 with actions/@, so your workflow always runs the exact same action code.[1]

Citations:


Fix de segurança no checkout (CodeQL): pin SHA e desative persistência de credenciais.

  • Em .github/workflows/codeql.yml (linha 29), actions/checkout@v5 usa tag mutável; troque para actions/checkout@<commit-SHA full-length> (imutável) para evitar mudanças silenciosas/supply-chain.
  • Como não há with: persist-credentials: false, o checkout persiste credenciais no git local por padrão; adicione with: persist-credentials: false.
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 28-29: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 29-29: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/codeql.yml at line 29, Replace the mutable GitHub Action
tag `actions/checkout@v5` with a pinned full commit SHA (e.g.,
`actions/checkout@<commit-SHA>`) and add the `with: persist-credentials: false`
option to the same step to avoid credential persistence; update the `uses:
actions/checkout` step to reference the commit SHA and include the
`persist-credentials: false` setting so the checkout step is immutable and does
not leave credentials in the checked-out repo.


- name: Initialize CodeQL
uses: github/codeql-action/init@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/contract-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
Comment on lines +40 to +41
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/contract-tests.yml"
echo "== File: $FILE =="
echo
nl -ba "$FILE" | sed -n '1,160p'
echo
echo "== uses: lines =="
rg -n "uses:\s*actions/(checkout|setup-node)@|persist-credentials:" "$FILE" -n || true

Repository: adm01-debug/promo-gifts-v4

Length of output: 181


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE=".github/workflows/contract-tests.yml"
echo "== File: $FILE =="
echo

if [ ! -f "$FILE" ]; then
  echo "Arquivo não encontrado: $FILE"
  exit 1
fi

# Mostrar com numeração (sem nl)
awk '{printf "%6d\t%s\n", NR, $0}' "$FILE" | sed -n '1,220p'

echo
echo "== Evidências: uses/actions e persist-credentials =="
awk '{print NR "\t" $0}' "$FILE" | rg -n "uses:\s*actions/(checkout|setup-node)@|persist-credentials:" || true

Repository: adm01-debug/promo-gifts-v4

Length of output: 4637


🏁 Script executed:

#!/bin/bash
set -euo pipefail
FILE=".github/workflows/contract-tests.yml"

echo "== persist-credentials no workflow =="
rg -n "persist-credentials\s*:" "$FILE" || true

echo
echo "== uses actions/*`@v`* (sem SHA) =="
rg -n "uses:\s*actions/[A-Za-z0-9_-]+@v[0-9]+" "$FILE" || true

echo
echo "== uses actions/*@<não-v>" # ajuda a ver se tem SHA em algum lugar
rg -n "uses:\s*actions/[A-Za-z0-9_-]+@([0-9a-f]{7,40})\b" "$FILE" || true

Repository: adm01-debug/promo-gifts-v4

Length of output: 322


🌐 Web query:

actions/checkout persist-credentials default value true or false

💡 Result:

The actions/checkout input persist-credentials defaults to true. In the official actions/checkout README, the option is documented as “Default: true” and describes that “The auth token is persisted in the local git config… Set persist-credentials: false to opt-out.” [1][2] So the default value is: true.

Citations:


Padronize o pin das Actions e desative persist-credentials no checkout.

O workflow usa actions/checkout@v5 e actions/setup-node@v6 por tag (job unit e também no job smoke), e o checkout não está com persist-credentials: false (padrão é true, deixando o token persistido em config local).

- uses: actions/checkout@v5
- uses: actions/setup-node@v6
  • Trocar checkout/setup-node para versões pinadas por SHA.
  • Adicionar with: persist-credentials: false no actions/checkout.
  • (Mesma linha de hardening) também pin de supabase/setup-cli@v1 por SHA.
🧰 Tools
🪛 zizmor (1.25.2)

[warning] 40-40: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 40-40: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 41-41: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/contract-tests.yml around lines 40 - 41, O workflow usa
tags em actions que devem ser travadas por SHA e o checkout está expondo o
token; trocar todas as referências `uses: actions/checkout@v5`, `uses:
actions/setup-node@v6` e `uses: supabase/setup-cli@v1` para seus respectivos
commits SHA-pinned versions, e no passo que usa `actions/checkout` adicionar a
opção `with: persist-credentials: false` para evitar persistir o token; atualize
os três usos correspondentes no job `unit` e `smoke` (procure por
actions/checkout, actions/setup-node e supabase/setup-cli) para aplicar esses
cambios.

with:
node-version: '20'
cache: 'npm'
Expand All @@ -63,9 +63,9 @@ jobs:
if: github.event.pull_request.head.repo.full_name == github.repository
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'npm'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/delivery-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: 'npm'
Expand All @@ -34,7 +34,7 @@ jobs:

- name: 📦 Upload Report
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: delivery-quality-report
path: |
Expand Down
Loading
Loading