Update .gitea/workflows/codeant.yml
Some checks failed
Codeant Security Scan / codeant-scan (push) Failing after 15s

This commit is contained in:
2026-03-29 17:01:41 +00:00
parent 2f95e39f0a
commit 6053179f25

View File

@@ -6,7 +6,7 @@ on:
pull_request: pull_request:
branches: ["main"] branches: ["main"]
schedule: schedule:
- cron: "0 0 * * *" # Daily Scan - cron: "0 0 * * *"
workflow_dispatch: workflow_dispatch:
jobs: jobs:
@@ -27,15 +27,20 @@ jobs:
- name: Install CodeAnt CLI - name: Install CodeAnt CLI
run: npm install -g codeant-cli run: npm install -g codeant-cli
- name: Authenticate CodeAnt # ✅ KEEP THIS (correct method)
run: codeant set-token github ${{ secrets.CODEANT_API_TOKEN }} - name: Configure CodeAnt Auth
env:
CODEANT_API_TOKEN: ${{ secrets.CODEANT_API_TOKEN }}
run: |
mkdir -p $HOME/.codeant
printf '{"apiKey":"%s"}\n' "$CODEANT_API_TOKEN" > $HOME/.codeant/config.json
- name: Setup Git identity - name: Setup Git identity
run: | run: |
git config --global user.email "ci@gitea.local" git config --global user.email "ci@gitea.local"
git config --global user.name "Gitea CI" git config --global user.name "Gitea CI"
# 🔥 Full scan only on schedule (recommended) # 🔥 Full scan only on schedule
- name: Full repo AI scan (daily) - name: Full repo AI scan (daily)
if: github.event_name == 'schedule' if: github.event_name == 'schedule'
run: | run: |
@@ -43,7 +48,6 @@ jobs:
git checkout -b codeant-fullscan || git checkout codeant-fullscan git checkout -b codeant-fullscan || git checkout codeant-fullscan
# Modify all files to force diff
find . -type f \ find . -type f \
-not -path "./.git/*" \ -not -path "./.git/*" \
-exec sh -c 'echo "" >> "$1"' _ {} \; -exec sh -c 'echo "" >> "$1"' _ {} \;
@@ -53,12 +57,11 @@ jobs:
codeant review --committed > review.txt || true codeant review --committed > review.txt || true
# ⚡ Normal scan (PR / push) # ⚡ Incremental scan
- name: Incremental AI scan - name: Incremental AI scan
if: github.event_name != 'schedule' if: github.event_name != 'schedule'
run: | run: |
echo "Running incremental scan..." echo "Running incremental scan..."
codeant review --committed > review.txt || true codeant review --committed > review.txt || true
- name: Show results - name: Show results