Skip to content

Commit 97425cc

Browse files
committed
Add LICENSE, SECURITY, CONTRIBUTING, and .github configurations for bugs, features, dependabot, security scans, and CodeQL analysis
1 parent 2439519 commit 97425cc

File tree

9 files changed

+579
-0
lines changed

9 files changed

+579
-0
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
**⚠️ Security Notice**
11+
If this bug involves a security vulnerability, please DO NOT create a public issue.
12+
Instead, follow our [Security Policy](../../SECURITY.md) for responsible disclosure.
13+
14+
**Describe the bug**
15+
A clear and concise description of what the bug is.
16+
17+
**To Reproduce**
18+
Steps to reproduce the behavior:
19+
1. Go to '...'
20+
2. Click on '....'
21+
3. Scroll down to '....'
22+
4. See error
23+
24+
**Expected behavior**
25+
A clear and concise description of what you expected to happen.
26+
27+
**Environment (please complete the following information):**
28+
- OS: [e.g. Windows 10, Ubuntu 20.04]
29+
- Python Version: [e.g. 3.9.0]
30+
- PostgreSQL Version: [e.g. 14.2]
31+
- MCP Server Version: [e.g. 1.0.0]
32+
33+
**Error Messages**
34+
```
35+
Paste any error messages here
36+
```
37+
38+
**Configuration**
39+
- Are you using environment variables for database connection?
40+
- What authentication method are you using?
41+
- Any custom configuration settings?
42+
43+
**Additional context**
44+
Add any other context about the problem here.
45+
46+
**Security Checklist**
47+
- [ ] I have verified this is not a security vulnerability
48+
- [ ] I have not included any sensitive information (passwords, connection strings, etc.)
49+
- [ ] This issue does not contain any proprietary or confidential information
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**PostgreSQL Tool Request**
20+
If you're requesting a new PostgreSQL tool:
21+
- Tool name: `PostgreSQL_[action]_[description]`
22+
- PostgreSQL feature/functionality it should interact with:
23+
- Expected parameters:
24+
- Expected return format:
25+
26+
**Use Case**
27+
Describe the specific use case or scenario where this feature would be helpful.
28+
29+
**Security Considerations**
30+
- Does this feature involve sensitive data?
31+
- Are there any security implications?
32+
- What permissions would be required?
33+
34+
**Additional context**
35+
Add any other context, mockups, or examples about the feature request here.
36+
37+
**Implementation Notes**
38+
If you have ideas about how this could be implemented, please share them here.

.github/dependabot.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for Python dependencies
4+
- package-ecosystem: "pip"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
time: "09:00"
10+
open-pull-requests-limit: 10
11+
reviewers:
12+
- "mukul975"
13+
labels:
14+
- "dependencies"
15+
- "security"
16+
commit-message:
17+
prefix: "deps"
18+
prefix-development: "deps-dev"
19+
# Group security updates together
20+
groups:
21+
security-updates:
22+
patterns:
23+
- "*"
24+
update-types:
25+
- "security-update"
26+
# Automatically merge minor and patch updates for known safe packages
27+
auto-merge:
28+
dependency-type: "development"
29+
update-type: "semver:patch"
30+
# Ignore specific packages if needed
31+
ignore:
32+
# Example: ignore major version updates for specific packages
33+
# - dependency-name: "some-package"
34+
# update-types: ["version-update:semver-major"]

.github/workflows/codeql-analysis.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
schedule:
9+
# Run CodeQL analysis weekly on Tuesdays at 3 AM UTC
10+
- cron: '0 3 * * 2'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'python' ]
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v2
32+
with:
33+
languages: ${{ matrix.language }}
34+
queries: security-extended,security-and-quality
35+
36+
- name: Set up Python
37+
uses: actions/setup-python@v4
38+
with:
39+
python-version: '3.9'
40+
41+
- name: Install dependencies
42+
run: |
43+
python -m pip install --upgrade pip
44+
pip install -r requirements.txt
45+
46+
- name: Perform CodeQL Analysis
47+
uses: github/codeql-action/analyze@v2
48+
with:
49+
category: "/language:${{matrix.language}}"

.github/workflows/security.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: Security Scan
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
schedule:
9+
# Run weekly security scans on Sundays at 2 AM UTC
10+
- cron: '0 2 * * 0'
11+
12+
jobs:
13+
security:
14+
runs-on: ubuntu-latest
15+
name: Security Analysis
16+
17+
permissions:
18+
actions: read
19+
contents: read
20+
security-events: write
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: '3.9'
30+
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install -r requirements.txt
35+
pip install bandit safety semgrep
36+
37+
- name: Run Bandit Security Linter
38+
run: |
39+
bandit -r . -f json -o bandit-report.json || true
40+
bandit -r . -f txt
41+
continue-on-error: true
42+
43+
- name: Run Safety Check
44+
run: |
45+
safety check --json --output safety-report.json || true
46+
safety check
47+
continue-on-error: true
48+
49+
- name: Run Semgrep
50+
run: |
51+
semgrep --config=auto --json --output=semgrep-report.json . || true
52+
semgrep --config=auto .
53+
continue-on-error: true
54+
55+
- name: Upload Bandit Results to GitHub Security
56+
uses: github/codeql-action/upload-sarif@v2
57+
if: always()
58+
with:
59+
sarif_file: bandit-report.json
60+
continue-on-error: true
61+
62+
- name: Archive security reports
63+
uses: actions/upload-artifact@v3
64+
if: always()
65+
with:
66+
name: security-reports
67+
path: |
68+
bandit-report.json
69+
safety-report.json
70+
semgrep-report.json
71+
72+
dependency-check:
73+
runs-on: ubuntu-latest
74+
name: Dependency Vulnerability Check
75+
76+
steps:
77+
- name: Checkout code
78+
uses: actions/checkout@v4
79+
80+
- name: Set up Python
81+
uses: actions/setup-python@v4
82+
with:
83+
python-version: '3.9'
84+
85+
- name: Install pip-audit
86+
run: |
87+
python -m pip install --upgrade pip
88+
pip install pip-audit
89+
90+
- name: Run pip-audit
91+
run: |
92+
pip-audit --desc --format=json --output=pip-audit-report.json || true
93+
pip-audit --desc
94+
continue-on-error: true
95+
96+
- name: Upload pip-audit results
97+
uses: actions/upload-artifact@v3
98+
if: always()
99+
with:
100+
name: pip-audit-report
101+
path: pip-audit-report.json
102+
103+
secrets-scan:
104+
runs-on: ubuntu-latest
105+
name: Secrets Detection
106+
107+
steps:
108+
- name: Checkout code
109+
uses: actions/checkout@v4
110+
with:
111+
fetch-depth: 0
112+
113+
- name: Run TruffleHog
114+
uses: trufflesecurity/trufflehog@main
115+
with:
116+
path: ./
117+
base: main
118+
head: HEAD
119+
extra_args: --debug --only-verified

0 commit comments

Comments
 (0)