Skip to content
Merged
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
41 changes: 41 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "CodeQL"

on:
push:
branches: [ "master", "main" ]
pull_request:
branches: [ "master", "main" ]
schedule:
- cron: '30 2 * * 1'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

Comment thread
devpathindcommunity-india marked this conversation as resolved.
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-extended,security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
20 changes: 20 additions & 0 deletions .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Gitleaks
on:
push:
branches: [ "master", "main" ]
pull_request:
branches: [ "master", "main" ]

jobs:
scan:
name: Secret Scanning
runs-on: ubuntu-latest
Comment thread
devpathindcommunity-india marked this conversation as resolved.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_ENABLE_UPLOAD_ARTIFACT: false
GITLEAKS_ENABLE_SUMMARY: true
64 changes: 64 additions & 0 deletions .github/workflows/nuclei-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: "Nuclei Security Scan"

on:
push:
branches: [ "master", "main" ]
pull_request:
branches: [ "master", "main" ]

jobs:
nuclei-scan:
runs-on: ubuntu-latest
name: Nuclei API & Web Security Scan
permissions:
contents: read
issues: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build Next.js (static export)
run: npm run build
env:
NEXT_PUBLIC_FIREBASE_API_KEY: "mock_api_key"
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: "mock.firebaseapp.com"
NEXT_PUBLIC_FIREBASE_PROJECT_ID: "mock_project_id"
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: "mock.appspot.com"
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: "123456789"
NEXT_PUBLIC_FIREBASE_APP_ID: "1:123456789:web:abcdef"

- name: Serve static build
run: npx serve@latest out -l 3000 &

- name: Wait for server to be ready
run: |
for i in {1..15}; do
curl -s http://localhost:3000 > /dev/null && echo "Server is up!" && break
echo "Waiting for server... ($i)"
sleep 2
done

- name: Run Nuclei Scan
uses: projectdiscovery/nuclei-action@v2
with:
target: http://localhost:3000
flags: "-tags exposure,misconfig,headers,tech -severity low,medium,high,critical"
output: nuclei-results.txt

- name: Upload Nuclei Results
uses: actions/upload-artifact@v4
if: always()
with:
name: nuclei-security-report
path: nuclei-results.txt
retention-days: 30
Loading