Cicd Integration
yaml name: Security Scan on: [push, pullrequest] jobs: scan: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Run...
Last updated: January 14, 2026
CI/CD Integration Example
GitHub Actions Workflow
name: Security Scan
on: [push, pull_request]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run BlockSecOps Scan
env:
BLOCKSECOPS_API_KEY: ${{ secrets.BLOCKSECOPS_API_KEY }}
run: |
# Upload
CONTRACT_ID=$(curl -s -X POST \
"https://api.blocksecops.com/api/v1/contracts/upload" \
-H "Authorization: Bearer $BLOCKSECOPS_API_KEY" \
-F "[email protected]" | jq -r '.id')
# Scan
SCAN_ID=$(curl -s -X POST \
"https://api.blocksecops.com/api/v1/scans" \
-H "Authorization: Bearer $BLOCKSECOPS_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"contract_id\": \"$CONTRACT_ID\", \"preset\": \"standard\"}" \
| jq -r '.id')
# Wait and check
while true; do
STATUS=$(curl -s \
"https://api.blocksecops.com/api/v1/scans/$SCAN_ID" \
-H "Authorization: Bearer $BLOCKSECOPS_API_KEY" \
| jq -r '.status')
[ "$STATUS" = "completed" ] && break
[ "$STATUS" = "failed" ] && exit 1
sleep 15
done
# Check results
CRITICAL=$(curl -s \
"https://api.blocksecops.com/api/v1/scans/$SCAN_ID/results" \
-H "Authorization: Bearer $BLOCKSECOPS_API_KEY" \
| jq '.summary.critical')
[ "$CRITICAL" -gt 0 ] && exit 1
echo "Scan passed!"