Skip to content

Commit 6737a02

Browse files
authored
feat(devops): add comprehensive DevOps infrastructure improvements (#276)
## Description Comprehensive DevOps infrastructure improvements addressing critical gaps identified in infrastructure assessment. This PR upgrades the project's DevOps score from 72/100 (Grade B-) to an estimated 90/100 (Grade A-). ## Type of Change - [x] New feature (non-breaking change adding functionality) - [x] Infrastructure improvement ## Features Added ### Release Automation - **GoReleaser**: Automated multi-platform binary releases (Linux/macOS/Windows × amd64/arm64/arm) - **Release Workflow**: Triggered on version tags with automated changelog generation ### Security Scanning - **CodeQL**: Security vulnerability scanning for Go and TypeScript with weekly scheduled scans - **Trivy**: Container vulnerability scanning with SARIF upload to GitHub Security tab - **Coverage**: All scans report to GitHub Security for centralized monitoring ### Code Quality & Linting - **golangci-lint**: 60+ Go linters including gosec (security), staticcheck (bugs), gocritic (style) - **ESLint**: Strict TypeScript/JavaScript linting with type-checked rules - **Configuration**: Both linters configured with project-specific settings ### Code Coverage - **Codecov**: Automated coverage tracking with 70% minimum threshold - **Integration**: Coverage reports uploaded on every CI run - **Badges**: Added codecov badge to README ### Dependency Management - **Dependabot**: Automated updates for Go modules, npm packages, GitHub Actions, and Docker images - **Grouping**: Related updates grouped to reduce PR noise - **Backup**: Complements existing Renovate configuration ### GitHub Templates - **Issue Templates**: Structured forms for bug reports, feature requests, and security issues - **PR Template**: Comprehensive checklist ensuring quality submissions - **Config**: Contact links for discussions and documentation ## Improvements to Existing Files ### CI/CD Workflows - Enhanced `check.yml` with code coverage collection and upload - Added separate linting jobs for Go and JavaScript/TypeScript - Enhanced `docker.yml` with Trivy security scanning ### Pre-commit Hooks - Added golangci-lint checks (warning mode) - Added ESLint checks (warning mode) - Non-blocking to avoid disrupting development workflow ### Documentation - Added new badges to README (CodeQL, Codecov, Docker) - Added comprehensive "Code Quality & Linting" section to development guide - Documented installation, usage, and pre-commit hooks ### Build System - Converted scripts to ES modules (`scripts/minify.js`, `postcss.config.js`) - Added `"type": "module"` to package.json for modern JavaScript - Maintained backward compatibility ## Testing Performed - [x] Go build successful - [x] Frontend assets compile correctly - [x] All Go tests pass - [x] ESLint runs successfully (identified 60 existing issues for gradual cleanup) - [x] Pre-commit hooks functional - [x] TypeScript compilation successful ## Code Quality - [x] Code follows project style guidelines (formatted with Prettier) - [x] Self-review performed - [x] Comments added where necessary - [x] Tests updated/added as needed - [x] No new warnings generated - [x] Linting passes (go vet, golangci-lint) ## Security Checklist - [x] No sensitive data exposed - [x] Security scanning enabled (CodeQL, Trivy) - [x] Dependencies configured for automated updates - [x] Pre-commit hooks prevent common issues ## Documentation - [x] README updated with new badges - [x] Development guide updated with linting documentation - [x] Configuration files include comments - [x] GitHub templates provide clear guidance ## Deployment Notes None - Infrastructure changes only, no application code changes. ## Related Issues Addresses DevOps infrastructure gaps identified in internal assessment. ## Breaking Changes None - All changes are additive and backward compatible. ## Impact Assessment **Before:** - Manual releases - No security scanning - Basic linting (go vet only) - No code coverage tracking - No TypeScript/JavaScript linting - Basic issue templates **After:** - ✅ Automated multi-platform releases - ✅ Comprehensive security scanning (CodeQL + Trivy) - ✅ 60+ Go linters for quality and security - ✅ Code coverage tracking with 70% threshold - ✅ Strict TypeScript/JavaScript linting - ✅ Automated dependency updates - ✅ Structured GitHub templates **DevOps Score:** - Before: 72/100 (Grade B-) - After: ~90/100 (Grade A-)
2 parents e7c4210 + f76319f commit 6737a02

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+4790
-1714
lines changed

.codecov.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Codecov configuration
2+
# https://docs.codecov.com/docs/codecov-yaml
3+
4+
coverage:
5+
status:
6+
project:
7+
default:
8+
target: 70% # Minimum coverage threshold
9+
threshold: 2% # Allow 2% drop from target
10+
if_ci_failed: error # Fail if CI fails
11+
patch:
12+
default:
13+
target: 70% # New code should maintain 70% coverage
14+
threshold: 2%
15+
if_ci_failed: error
16+
17+
precision: 2
18+
round: down
19+
range: "60...90" # Green at 90%, red at 60%
20+
21+
comment:
22+
layout: "reach,diff,flags,tree,footer"
23+
behavior: default
24+
require_changes: false
25+
require_base: false
26+
require_head: true
27+
28+
ignore:
29+
- "**/*_test.go" # Ignore test files
30+
- "**/test/**"
31+
- "**/tests/**"
32+
- "**/testdata/**"
33+
- "internal/web/static/**" # Ignore generated frontend assets
34+
- "docs/**"
35+
- "claudedocs/**"
36+
- "*.md"
37+
- "vendor/**"
38+
39+
flags:
40+
backend:
41+
paths:
42+
- "**/*.go"
43+
carryforward: true
44+
unittests:
45+
paths:
46+
- "**/*.go"
47+
carryforward: true
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior
3+
title: "[Bug]: "
4+
labels: ["bug", "needs-triage"]
5+
assignees: []
6+
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thank you for reporting a bug! Please fill out the following information to help us investigate and fix the issue.
12+
13+
- type: textarea
14+
id: description
15+
attributes:
16+
label: Bug Description
17+
description: A clear and concise description of what the bug is.
18+
placeholder: Describe the bug...
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: steps
24+
attributes:
25+
label: Steps to Reproduce
26+
description: Steps to reproduce the behavior
27+
placeholder: |
28+
1. Go to '...'
29+
2. Click on '...'
30+
3. Scroll down to '...'
31+
4. See error
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
id: expected
37+
attributes:
38+
label: Expected Behavior
39+
description: What did you expect to happen?
40+
placeholder: Describe what you expected...
41+
validations:
42+
required: true
43+
44+
- type: textarea
45+
id: actual
46+
attributes:
47+
label: Actual Behavior
48+
description: What actually happened?
49+
placeholder: Describe what actually happened...
50+
validations:
51+
required: true
52+
53+
- type: textarea
54+
id: logs
55+
attributes:
56+
label: Logs
57+
description: If applicable, add logs to help explain the problem.
58+
placeholder: Paste relevant logs here...
59+
render: shell
60+
61+
- type: input
62+
id: version
63+
attributes:
64+
label: Version
65+
description: What version of GopherPass are you using?
66+
placeholder: e.g., v1.0.13
67+
validations:
68+
required: true
69+
70+
- type: dropdown
71+
id: deployment
72+
attributes:
73+
label: Deployment Method
74+
description: How are you running GopherPass?
75+
options:
76+
- Docker
77+
- Binary
78+
- Build from source
79+
- Other
80+
validations:
81+
required: true
82+
83+
- type: input
84+
id: ldap-server
85+
attributes:
86+
label: LDAP Server Type
87+
description: What LDAP server are you using?
88+
placeholder: e.g., Active Directory, OpenLDAP, FreeIPA
89+
90+
- type: textarea
91+
id: environment
92+
attributes:
93+
label: Environment Details
94+
description: Relevant environment information
95+
placeholder: |
96+
- OS: [e.g., Ubuntu 24.04]
97+
- Browser: [e.g., Chrome 120]
98+
- Go version (if building from source): [e.g., 1.25]
99+
value: |
100+
- OS:
101+
- Browser:
102+
- Go version:
103+
104+
- type: textarea
105+
id: additional
106+
attributes:
107+
label: Additional Context
108+
description: Add any other context about the problem here.
109+
placeholder: Any additional information...
110+
111+
- type: checkboxes
112+
id: checks
113+
attributes:
114+
label: Pre-submission Checklist
115+
description: Please confirm the following
116+
options:
117+
- label: I have searched for existing issues and this is not a duplicate
118+
required: true
119+
- label: I have redacted any sensitive information from logs and screenshots
120+
required: true
121+
- label: I am using the latest version (or have checked the changelog)
122+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: 💬 Discussions
4+
url: https://github.com/netresearch/ldap-selfservice-password-changer/discussions
5+
about: Ask questions, share ideas, and discuss with the community
6+
- name: 📖 Documentation
7+
url: https://github.com/netresearch/ldap-selfservice-password-changer/tree/main/docs
8+
about: Read the documentation for setup guides and configuration help
9+
- name: 🔒 Private Security Advisory
10+
url: https://github.com/netresearch/ldap-selfservice-password-changer/security/advisories/new
11+
about: Report sensitive security vulnerabilities privately (recommended for exploitable issues)
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement
3+
title: "[Feature]: "
4+
labels: ["enhancement", "needs-triage"]
5+
assignees: []
6+
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thank you for suggesting a feature! Please provide as much detail as possible to help us understand your request.
12+
13+
- type: textarea
14+
id: problem
15+
attributes:
16+
label: Problem Statement
17+
description: Is your feature request related to a problem? Please describe.
18+
placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: solution
24+
attributes:
25+
label: Proposed Solution
26+
description: Describe the solution you'd like
27+
placeholder: A clear and concise description of what you want to happen.
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: alternatives
33+
attributes:
34+
label: Alternatives Considered
35+
description: Describe alternatives you've considered
36+
placeholder: A clear and concise description of any alternative solutions or features you've considered.
37+
38+
- type: dropdown
39+
id: component
40+
attributes:
41+
label: Component
42+
description: Which component does this feature relate to?
43+
options:
44+
- Authentication
45+
- Password Change
46+
- Password Reset
47+
- User Interface
48+
- LDAP Integration
49+
- Email Notifications
50+
- Security
51+
- Configuration
52+
- Deployment
53+
- Documentation
54+
- Other
55+
56+
- type: dropdown
57+
id: priority
58+
attributes:
59+
label: Priority
60+
description: How important is this feature to you?
61+
options:
62+
- Nice to have
63+
- Would significantly improve my workflow
64+
- Critical for my use case
65+
66+
- type: textarea
67+
id: use-case
68+
attributes:
69+
label: Use Case
70+
description: Describe your use case and how this feature would help
71+
placeholder: Explain how you would use this feature and what value it would provide...
72+
validations:
73+
required: true
74+
75+
- type: textarea
76+
id: implementation
77+
attributes:
78+
label: Implementation Ideas
79+
description: If you have ideas about how this could be implemented, share them here
80+
placeholder: Optional technical details, API suggestions, UI mockups, etc.
81+
82+
- type: textarea
83+
id: additional
84+
attributes:
85+
label: Additional Context
86+
description: Add any other context, screenshots, or examples about the feature request here.
87+
placeholder: Any additional information...
88+
89+
- type: checkboxes
90+
id: checks
91+
attributes:
92+
label: Pre-submission Checklist
93+
description: Please confirm the following
94+
options:
95+
- label: I have searched for existing issues and this feature has not been requested before
96+
required: true
97+
- label: This feature aligns with the project's goals (LDAP self-service password management)
98+
required: true
99+
- label: I am willing to help test this feature once implemented
100+
required: false

0 commit comments

Comments
 (0)