Skip to content

Commit 58fb258

Browse files
Add CODEOWNERS, FUNDING, SECURITY, SUPPORT, and Dependabot configuration files; update CONTRIBUTING guidelines
1 parent 61d4471 commit 58fb258

File tree

7 files changed

+269
-18
lines changed

7 files changed

+269
-18
lines changed

.github/CODEOWNERS

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# CODEOWNERS file for PSScriptModule
2+
# This file defines code ownership and review requirements for the repository
3+
# See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
4+
5+
# Default owners for everything in the repo
6+
# These owners will be requested for review when someone opens a pull request
7+
* @marko-stanojevic
8+
9+
# Source code
10+
/src/ @marko-stanojevic
11+
12+
# Build and CI/CD
13+
*.build.ps1 @marko-stanojevic
14+
/.github/workflows/ @marko-stanojevic
15+
/requirements.psd1 @marko-stanojevic
16+
/gitversion.yml @marko-stanojevic
17+
18+
# Tests
19+
/tests/ @marko-stanojevic

.github/FUNDING.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# See https://help.github.com/articles/adding-a-funding-file-to-your-repository/ for more information
2+
github: marko-stanojevic
3+
ko_fi: mstanojevic
4+
buy_me_a_coffee: marko.stanojevic
5+
liberapay: marko-stanojevic
6+
custom: ["https://www.paypal.me/mstanojevic84"]
File renamed without changes.

.github/SECURITY.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
We release patches for security vulnerabilities. Currently supported versions:
6+
7+
| Version | Supported |
8+
| ------- | ------------------ |
9+
| latest | :white_check_mark: |
10+
| < latest| :x: |
11+
12+
## Reporting a Vulnerability
13+
14+
We take the security of PSScriptModule seriously. If you believe you have found a security vulnerability, please report it to us as described below.
15+
16+
### Please Do Not
17+
18+
- **Do not** open a public GitHub issue for security vulnerabilities
19+
- **Do not** disclose the vulnerability publicly until it has been addressed
20+
21+
### Please Do
22+
23+
1. **Report via GitHub Security Advisories**:
24+
- Navigate to the repository's "Security" tab
25+
- Click "Report a vulnerability"
26+
- Provide detailed information about the vulnerability
27+
28+
1. **Include in Your Report**:
29+
- Description of the vulnerability
30+
- Steps to reproduce the issue
31+
- Potential impact
32+
- Suggested fix (if available)
33+
- Your contact information
34+
35+
## Security Best Practices
36+
37+
When using this PowerShell module template:
38+
39+
### Code Security
40+
41+
- **Never commit credentials**: Use `SecureString` or credential management systems
42+
- **Validate all inputs**: Use parameter validation attributes
43+
- **Sanitize user input**: Prevent injection attacks
44+
- **Use approved verbs**: Follow PowerShell naming conventions
45+
- **Handle errors properly**: Don't expose sensitive information in error messages
46+
47+
### Development Security
48+
49+
- **Run PSScriptAnalyzer**: All code must pass static analysis
50+
- **Run InjectionHunter tests**: Check for injection vulnerabilities
51+
- **Review dependencies**: Regularly update modules in `requirements.psd1`
52+
53+
### Deployment Security
54+
55+
- **Sign your scripts**: Use code signing certificates for production
56+
- **Verify execution policy**: Use appropriate PowerShell execution policies
57+
- **Limit permissions**: Follow principle of least privilege
58+
- **Audit module usage**: Enable PowerShell logging in production environments
59+
60+
## Known Security Considerations
61+
62+
### PowerShell Execution
63+
64+
This module requires PowerShell script execution. Ensure:
65+
66+
- Execution policy is set appropriately for your environment
67+
- Scripts are obtained from trusted sources
68+
- Code signing is enforced in production environments
69+
70+
### External Dependencies
71+
72+
This project uses external PowerShell modules:
73+
74+
- **InvokeBuild**: Build orchestration
75+
- **Pester**: Testing framework
76+
- **PSScriptAnalyzer**: Static code analysis
77+
- **platyPS**: Documentation generation
78+
79+
Review the security advisories for these dependencies regularly.
80+
81+
## Security Testing
82+
83+
### Automated Tests
84+
85+
Every PR runs:
86+
87+
1. **PSScriptAnalyzer**: Static code analysis for common issues
88+
1. **InjectionHunter**: Detection of potential injection vulnerabilities
89+
1. **Pester Tests**: Functional testing including security scenarios
90+
1. **Dependency Checks**: Ensure dependencies are up-to-date
91+
92+
## Security Update Process
93+
94+
When a security vulnerability is confirmed:
95+
96+
1. **Assessment**: Evaluate severity and impact
97+
1. **Fix Development**: Create patch in private branch
98+
1. **Testing**: Thoroughly test the security fix
99+
1. **Release**:
100+
- Use `+semver: patch` for minor security fixes
101+
- Use `+semver: major` for breaking security changes
102+
1. **Disclosure**: Publish security advisory after fix is released
103+
1. **Notification**: Notify users of the security update
104+
105+
## Additional Resources
106+
107+
- [PowerShell Security Best Practices](https://docs.microsoft.com/en-us/powershell/scripting/learn/security/powershell-security-best-practices)
108+
- [PSScriptAnalyzer Rules](https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Rules/README.md)
109+
- [OWASP Secure Coding Practices](https://owasp.org/www-project-secure-coding-practices-quick-reference-guide/)
110+
111+
## Contact
112+
113+
For security-related questions that are not vulnerabilities, please open a regular GitHub issue or discussion.
114+
115+
---
116+
117+
**Thank you for helping keep PSScriptModule and its users safe!**

.github/SUPPORT.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Support
2+
3+
## Getting Help
4+
5+
Thank you for using PSScriptModule! If you need help or have questions, here are the available resources:
6+
7+
### Documentation
8+
9+
- **[README](../README.md)** - Project overview and quick start guide
10+
- **[Help Documentation](../docs/help/)** - Detailed cmdlet reference
11+
- **[AI Agents Guide](../AGENTS.md)** - Guidance for AI-assisted development
12+
13+
### Community Support
14+
15+
- **GitHub Issues** - Search [existing issues](../../issues) or [create a new issue](../../issues/new) for:
16+
- Bug reports
17+
- Feature requests
18+
- Questions about usage
19+
- Documentation clarifications
20+
21+
- **GitHub Discussions** - Join [discussions](../../discussions) for:
22+
- General questions
23+
- Best practices
24+
- Community collaboration
25+
- Show and tell
26+
27+
### Reporting Issues
28+
29+
When reporting issues, please include:
30+
31+
1. **PowerShell Version**: Output of `$PSVersionTable`
32+
1. **Module Version**: Output of `Get-Module PSScriptModule`
33+
1. **Operating System**: Windows, macOS, or Linux distribution
34+
1. **Steps to Reproduce**: Clear steps to reproduce the issue
35+
1. **Expected Behavior**: What you expected to happen
36+
1. **Actual Behavior**: What actually happened
37+
1. **Error Messages**: Full error output with stack traces if available
38+
39+
### Security Issues
40+
41+
**Do not report security vulnerabilities through public GitHub issues.**
42+
43+
Please report security vulnerabilities by emailing the project maintainer or using GitHub's private security reporting feature.
44+
45+
### Contributing
46+
47+
Interested in contributing? See our [Contributing Guidelines](CONTRIBUTING.md) for:
48+
49+
- Code of conduct
50+
- Development setup
51+
- Pull request process
52+
- Coding standards
53+
54+
### Response Times
55+
56+
This is a community-driven project. Response times may vary:
57+
58+
- **Critical bugs**: We aim to respond within 48 hours
59+
- **General issues**: Usually responded to within 1 week
60+
- **Feature requests**: Reviewed during regular planning cycles
61+
62+
### Additional Resources
63+
64+
- **PowerShell Documentation**: [docs.microsoft.com/powershell](https://docs.microsoft.com/en-us/powershell/)
65+
- **Pester Documentation**: [pester.dev](https://pester.dev/)
66+
- **PSScriptAnalyzer**: [github.com/PowerShell/PSScriptAnalyzer](https://github.com/PowerShell/PSScriptAnalyzer)
67+
68+
---
69+
70+
**Note**: This project is maintained by volunteers. Please be patient and respectful when seeking support.

.github/dependabot.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Automatically checks for updates to GitHub Actions and PowerShell modules
2+
3+
version: 2
4+
updates:
5+
# GitHub Actions dependencies
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
interval: "weekly"
10+
day: "monday"
11+
labels:
12+
- "dependencies"
13+
- "github-actions"
14+
commit-message:
15+
prefix: "ci"
16+
include: "scope"
17+
open-pull-requests-limit: 5
18+
19+
# PowerShell modules via requirements.psd1
20+
# Note: Dependabot doesn't natively support PowerShell modules
21+
# This monitors the requirements.psd1 file for manual updates
22+
- package-ecosystem: "nuget"
23+
directory: "/"
24+
schedule:
25+
interval: "weekly"
26+
day: "monday"
27+
labels:
28+
- "dependencies"
29+
- "powershell"
30+
commit-message:
31+
prefix: "deps"
32+
include: "scope"
33+
open-pull-requests-limit: 5
34+
ignore:
35+
# PowerShell modules are managed via PSDepend
36+
# This is primarily for any NuGet packages if added later
37+
- dependency-name: "*"
38+
update-types: ["version-update:semver-major"]

CONTRIBUTING.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,18 @@ We welcome suggestions for enhancements! Please:
3030
### Pull Requests
3131

3232
1. **Fork the repository** and create your branch from `main`
33-
2. **Follow the project structure**:
33+
1. **Follow the project structure**:
3434
- Place public functions in `src/Public/`
3535
- Place private functions in `src/Private/`
3636
- Add corresponding Pester tests with `.Tests.ps1` suffix
3737
- Update documentation in `docs/help/` if needed
38-
39-
3. **Write quality code**:
38+
1. **Write quality code**:
4039
- Follow PowerShell best practices
4140
- Use approved verbs for function names (Get, Set, New, etc.)
4241
- Include proper comment-based help for all public functions
4342
- Ensure your code passes PSScriptAnalyzer checks
43+
1. **Test your changes**:
4444

45-
4. **Test your changes**:
4645
```powershell
4746
# Run all tests
4847
Invoke-Build Test
@@ -54,19 +53,17 @@ We welcome suggestions for enhancements! Please:
5453
Invoke-Build Invoke-UnitTests
5554
```
5655

57-
5. **Document your changes**:
56+
1. **Document your changes**:
5857
- Update the README.md if needed
59-
- Generate or update function help sections
60-
61-
6. **Commit your changes**:
58+
- Generate or update function help sections
59+
1. **Commit your changes**:
6260
- Use clear and meaningful commit messages
6361
- Follow semantic versioning keywords in commit messages:
6462
- `+semver: breaking` or `+semver: major` for breaking changes
6563
- `+semver: feature` or `+semver: minor` for new features
6664
- `+semver: fix` or `+semver: patch` for bug fixes
6765
- `+semver: none` or `+semver: skip` to skip version bump
68-
69-
7. **Submit a pull request**:
66+
1. **Submit a pull request**:
7067
- Provide a clear description of the changes
7168
- Reference any related issues
7269
- Ensure all CI checks pass
@@ -78,21 +75,23 @@ We welcome suggestions for enhancements! Please:
7875
- PowerShell 7.0 or higher (PowerShell 5.1 minimum)
7976
- Git
8077
- Required modules (installed via PSDepend):
81-
- InvokeBuild
82-
- ModuleBuilder
83-
- Pester
84-
- PSScriptAnalyzer
85-
- PlatyPS
78+
- InvokeBuild
79+
- ModuleBuilder
80+
- Pester
81+
- PSScriptAnalyzer
82+
- PlatyPS
8683

8784
### Setting Up Your Development Environment
8885

8986
1. Clone your fork:
87+
9088
```bash
9189
git clone https://github.com/YOUR-USERNAME/PSScriptModule.Template.git
9290
cd PSScriptModule.Template
9391
```
9492

95-
2. Install dependencies:
93+
1. Install dependencies:
94+
9695
```powershell
9796
# Install PSDepend if not already installed
9897
Install-Module -Name PSDepend -Scope CurrentUser
@@ -101,7 +100,8 @@ We welcome suggestions for enhancements! Please:
101100
Invoke-PSDepend -Path ./requirements.psd1 -Install -Import -Force
102101
```
103102

104-
3. Create a new branch:
103+
1. Create a new branch:
104+
105105
```bash
106106
git checkout -b feature/your-feature-name
107107
```
@@ -135,6 +135,7 @@ Invoke-Build Clean
135135
- Mock external dependencies
136136

137137
Example test structure:
138+
138139
```powershell
139140
Describe 'Get-MyFunction' {
140141
Context 'When valid input is provided' {
@@ -194,7 +195,7 @@ Version numbers are automatically managed by GitVersion based on commit messages
194195
Releases are automated through the CI/CD pipeline:
195196

196197
1. Merge pull request to `main` branch
197-
2. CI/CD pipeline automatically:
198+
1. CI/CD pipeline automatically:
198199
- Calculates version number using GitVersion
199200
- Runs all tests and checks
200201
- Builds the module

0 commit comments

Comments
 (0)