Skip to content

chore: update package version to 0.18.0 and enhance linting and forma… #4

chore: update package version to 0.18.0 and enhance linting and forma…

chore: update package version to 0.18.0 and enhance linting and forma… #4

Workflow file for this run

name: Security Audit
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
schedule:
# Run security audit daily at 2 AM UTC
- cron: '0 2 * * *'
jobs:
security-audit:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run npm audit
run: npm audit --audit-level=high
continue-on-error: true
- name: Run custom security checks
run: npm run security:deps
- name: Run ESLint security rules
run: npm run lint
- name: Security audit summary
if: always()
run: |
echo "## Security Audit Results" >> $GITHUB_STEP_SUMMARY
echo "- npm audit: $(npm audit --audit-level=high > /dev/null 2>&1 && echo "✅ Passed" || echo "❌ Issues found")" >> $GITHUB_STEP_SUMMARY
echo "- Custom checks: $(npm run security:deps > /dev/null 2>&1 && echo "✅ Passed" || echo "❌ Issues found")" >> $GITHUB_STEP_SUMMARY
echo "- Linting: $(npm run lint > /dev/null 2>&1 && echo "✅ Passed" || echo "❌ Issues found")" >> $GITHUB_STEP_SUMMARY
dependency-review:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Dependency Review
uses: actions/dependency-review-action@v3
with:
fail-on-severity: moderate
allow-licenses: MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, GPL-3.0, MIT-0, CC0-1.0
codeql-analysis:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: javascript
queries: security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2