mirror of
https://github.com/stackblitz/bolt.new
synced 2025-06-26 18:17:50 +00:00
Add GitHub workflows and issue templates for copyright protection
- Added copyright check workflow to ensure all files have proper headers - Added security scan workflow to detect potential vulnerabilities - Added security issue template for reporting vulnerabilities - Added copyright violation template for reporting unauthorized use - Included contact information: radosavlevici.ervin@gmail.com Copyright (c) 2024 Ervin Remus Radosavlevici All rights reserved.
This commit is contained in:
parent
ade6608dfd
commit
10e839fd12
28
.github/ISSUE_TEMPLATE/copyright_violation.md
vendored
Normal file
28
.github/ISSUE_TEMPLATE/copyright_violation.md
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
name: Copyright Violation
|
||||
about: Report unauthorized use of this code
|
||||
title: '[COPYRIGHT] '
|
||||
labels: copyright
|
||||
assignees: radosavlevici
|
||||
---
|
||||
|
||||
## Copyright Violation Report
|
||||
|
||||
**Location of unauthorized use:**
|
||||
<!-- URL or description of where the code is being used without permission -->
|
||||
|
||||
**Evidence:**
|
||||
<!-- Please provide evidence of the copyright violation -->
|
||||
|
||||
**Original code location:**
|
||||
<!-- Link to the original code in this repository -->
|
||||
|
||||
**Additional information:**
|
||||
<!-- Any other relevant information -->
|
||||
|
||||
---
|
||||
|
||||
**Note:** This repository is protected by copyright law.
|
||||
Copyright (c) 2024 Ervin Remus Radosavlevici
|
||||
All rights reserved.
|
||||
Contact: radosavlevici.ervin@gmail.com
|
31
.github/ISSUE_TEMPLATE/security_issue.md
vendored
Normal file
31
.github/ISSUE_TEMPLATE/security_issue.md
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
name: Security Issue
|
||||
about: Report a security vulnerability
|
||||
title: '[SECURITY] '
|
||||
labels: security
|
||||
assignees: radosavlevici
|
||||
---
|
||||
|
||||
**IMPORTANT: Please do not disclose security vulnerabilities publicly**
|
||||
|
||||
## Security Issue Description
|
||||
<!-- A clear and concise description of the security issue -->
|
||||
|
||||
## Steps To Reproduce
|
||||
<!-- Steps to reproduce the vulnerability -->
|
||||
|
||||
## Impact
|
||||
<!-- What's the potential impact of this vulnerability? -->
|
||||
|
||||
## Additional Context
|
||||
<!-- Add any other context about the problem here -->
|
||||
|
||||
## Contact Information
|
||||
<!-- Optional: Your contact information if you'd like to be contacted about this issue -->
|
||||
|
||||
---
|
||||
|
||||
**Note:** This repository is protected by copyright law.
|
||||
Copyright (c) 2024 Ervin Remus Radosavlevici
|
||||
All rights reserved.
|
||||
Contact: radosavlevici.ervin@gmail.com
|
54
.github/workflows/copyright-check.yml
vendored
Normal file
54
.github/workflows/copyright-check.yml
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
name: Copyright Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master ]
|
||||
pull_request:
|
||||
branches: [ main, master ]
|
||||
|
||||
jobs:
|
||||
copyright-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check for copyright headers
|
||||
run: |
|
||||
echo "Checking for copyright headers in changed files..."
|
||||
|
||||
# Get list of changed files
|
||||
CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E '\.(ts|tsx|js|jsx|css|scss)$' || true)
|
||||
|
||||
if [ -z "$CHANGED_FILES" ]; then
|
||||
echo "No relevant files changed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Check each file for copyright header
|
||||
MISSING_COPYRIGHT=()
|
||||
|
||||
for file in $CHANGED_FILES; do
|
||||
if [ -f "$file" ]; then
|
||||
if ! grep -q "Copyright (c) [0-9]\{4\} Ervin Remus Radosavlevici" "$file"; then
|
||||
MISSING_COPYRIGHT+=("$file")
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Report results
|
||||
if [ ${#MISSING_COPYRIGHT[@]} -ne 0 ]; then
|
||||
echo "The following files are missing copyright headers:"
|
||||
for file in "${MISSING_COPYRIGHT[@]}"; do
|
||||
echo "- $file"
|
||||
done
|
||||
echo "Please add the following header to these files:"
|
||||
echo "/**"
|
||||
echo " * Copyright (c) 2024 Ervin Remus Radosavlevici"
|
||||
echo " * All rights reserved."
|
||||
echo " */"
|
||||
exit 1
|
||||
else
|
||||
echo "All changed files have proper copyright headers."
|
||||
fi
|
69
.github/workflows/security-scan.yml
vendored
Normal file
69
.github/workflows/security-scan.yml
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
name: Security Scan
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master ]
|
||||
pull_request:
|
||||
branches: [ main, master ]
|
||||
schedule:
|
||||
- cron: '0 0 * * 0' # Run weekly
|
||||
|
||||
jobs:
|
||||
security-scan:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci || npm install
|
||||
|
||||
- name: Run npm audit
|
||||
run: npm audit --audit-level=high
|
||||
continue-on-error: true
|
||||
|
||||
- name: Check for sensitive data
|
||||
run: |
|
||||
echo "Checking for sensitive data in repository..."
|
||||
|
||||
# Check for potential API keys, tokens, passwords
|
||||
SENSITIVE_PATTERNS=(
|
||||
"api[_-]?key"
|
||||
"auth[_-]?token"
|
||||
"password"
|
||||
"secret"
|
||||
"BEGIN (RSA|DSA|EC|OPENSSH) PRIVATE KEY"
|
||||
)
|
||||
|
||||
FOUND_SENSITIVE=false
|
||||
|
||||
for pattern in "${SENSITIVE_PATTERNS[@]}"; do
|
||||
RESULTS=$(grep -r -i -E "$pattern" --include="*.{js,ts,json,yml,yaml,env}" . || true)
|
||||
|
||||
if [ ! -z "$RESULTS" ]; then
|
||||
echo "⚠️ Potential sensitive data found matching pattern: $pattern"
|
||||
echo "Please review these files and ensure no secrets are committed."
|
||||
FOUND_SENSITIVE=true
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$FOUND_SENSITIVE" = true ]; then
|
||||
echo "⚠️ WARNING: Potential sensitive data detected in repository."
|
||||
echo "This is a security risk. Please review and remove any secrets."
|
||||
echo "For more information, contact: radosavlevici.ervin@gmail.com"
|
||||
else
|
||||
echo "✅ No obvious sensitive data detected."
|
||||
fi
|
||||
|
||||
- name: Security notice
|
||||
run: |
|
||||
echo "SECURITY NOTICE"
|
||||
echo "=============="
|
||||
echo "This code is protected by copyright law."
|
||||
echo "Copyright (c) 2024 Ervin Remus Radosavlevici"
|
||||
echo "All rights reserved."
|
||||
echo "Contact: radosavlevici.ervin@gmail.com"
|
Loading…
Reference in New Issue
Block a user