All checks were successful
Codeant Security Scan / codeant-scan (push) Successful in 45s
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
name: Codeant Security Scan
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
pull_request:
|
|
branches: ["main"]
|
|
schedule:
|
|
- cron: "0 0 * * *" # Daily Scan
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
codeant-scan:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Node.js (Satisfies Engine Requirements)
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '22' # Using Node 22 to avoid EBADENGINE errors
|
|
- name: Install and Inject Config
|
|
env:
|
|
MY_KEY: ${{ secrets.CODEANT_API_TOKEN }}
|
|
run: |
|
|
npm install -g codeant-cli
|
|
mkdir -p $HOME/.codeant
|
|
echo $MY_KEY
|
|
# Now we use the environment variable $MY_KEY
|
|
printf '{"apiKey":"%s"}\n' "$MY_KEY" > $HOME/.codeant/config.json
|
|
cat $HOME/.codeant/config.json
|
|
|
|
# Verify: This should now show ~35-40 bytes
|
|
echo "Config file size: $(wc -c < $HOME/.codeant/config.json) bytes"
|
|
|
|
- name: Run CodeAnt AI Review
|
|
run: |
|
|
echo "Preparing full repo scan..."
|
|
|
|
git config --global user.email "ci@gitea.local"
|
|
git config --global user.name "Gitea CI"
|
|
|
|
# Ensure we have main branch
|
|
git fetch origin main
|
|
|
|
# Create a new branch from main
|
|
git checkout -b codeant-scan
|
|
|
|
# Make a dummy change to force diff
|
|
echo "# scan $(date)" >> codeant-temp.txt
|
|
|
|
git add .
|
|
git commit -m "codeant full scan trigger"
|
|
|
|
echo "Running CodeAnt AI Review..."
|
|
codeant review --committed > review.txt || true
|
|
|
|
cat review.txt |