- Pin all 23 GitHub Actions uses to 40-char commit SHA with tag comments:
actions/checkout@v6 -> d23441a48e516b6c34aea4fa41551a30e30af803 (v6.1.0)
actions/setup-dotnet@v5 -> 26b0ec14cb23fa6904739307f278c14f94c95bf1 (v5.4.0)
actions/upload-artifact@v6 -> b7c566a772e6b6bfb58ed0dc250532a479d7789f (v6.0.0)
actions/download-artifact@v8 -> 3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c (v8.0.1)
softprops/action-gh-release@v2 -> 3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 (v2.6.2)
SHAs verified via gh api repos/<owner>/<action>/git/ref/tags/<tag>
- Move contents:write from workflow level to release steps only
- Add dotnet CycloneDX SBOM generation to linux-release and windows-release
- Add .github/dependabot.yml (github-actions + nuget, weekly, limit 5 PRs)
- Add SECURITY.md with private advisory channel, 72h SLA, threat model
- Add CHANGELOG.md from real git history (Keep a Changelog format)
- Add CONTRIBUTING.md with build/test instructions and Linux test note
- Add CODEOWNERS
- Add .github/ISSUE_TEMPLATE/{bug_report,feature_request}.md
- Add .github/PULL_REQUEST_TEMPLATE.md with mandatory verification checklist
92 lines
2.8 KiB
Markdown
92 lines
2.8 KiB
Markdown
# Contributing to Server Monitor Manager
|
|
|
|
Thank you for your interest in contributing. This document describes how to
|
|
build the project, run tests, and submit changes.
|
|
|
|
## Building
|
|
|
|
### Prerequisites
|
|
|
|
- [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0)
|
|
- A Linux host or WSL for server-side components (see [Testing](#testing))
|
|
- `shellcheck` for shell script linting
|
|
|
|
### Build
|
|
|
|
```bash
|
|
dotnet build ServerMonitorManager.slnx --configuration Release
|
|
```
|
|
|
|
### Publish (Linux binaries)
|
|
|
|
```bash
|
|
dotnet publish src/ServerMonitorManager.Agent/ServerMonitorManager.Agent.csproj \
|
|
--configuration Release --runtime linux-x64 --self-contained true \
|
|
-p:PublishSingleFile=true -p:PublishTrimmed=true -o out/agent
|
|
|
|
dotnet publish src/ServerMonitorManager.Control/ServerMonitorManager.Control.csproj \
|
|
--configuration Release --runtime linux-x64 --self-contained true \
|
|
-p:PublishSingleFile=true -p:PublishTrimmed=true -o out/control
|
|
```
|
|
|
|
## Testing
|
|
|
|
### Unit and integration tests
|
|
|
|
```bash
|
|
dotnet test tests/ServerMonitorManager.Control.Tests/ServerMonitorManager.Control.Tests.csproj \
|
|
--configuration Release
|
|
```
|
|
|
|
> **Important:** The Control test suite must be run on **Linux**. A subset of
|
|
> tests is gated with `[SupportedOSPlatform("linux")]` / `OperatingSystem.IsLinux()`
|
|
> and will be **silently skipped on Windows**. CI always runs these on Ubuntu;
|
|
> do not interpret a green local run on Windows as full test coverage.
|
|
|
|
### Bootstrap contract tests
|
|
|
|
```bash
|
|
bash tests/bootstrap/test-bootstrap-contract.sh
|
|
bash tests/bootstrap/test-enrollment-token-argv.sh
|
|
```
|
|
|
|
### Shell script linting
|
|
|
|
```bash
|
|
shellcheck --severity=error deploy/ochenstarik-server-monitor-manager.sh
|
|
shellcheck --severity=error deploy/ochenstarik-smm-policy-apply
|
|
shellcheck --severity=error deploy/ochenstarik-smm-emergency
|
|
```
|
|
|
|
### Windows Desktop tests
|
|
|
|
```powershell
|
|
./tests/windows/Test-DesktopContracts.ps1
|
|
dotnet test tests/ServerMonitorManager.Desktop.Security.Tests/ServerMonitorManager.Desktop.Security.Tests.csproj --configuration Release
|
|
```
|
|
|
|
## Code Style
|
|
|
|
Verify formatting before committing:
|
|
|
|
```bash
|
|
dotnet format ServerMonitorManager.slnx --verify-no-changes
|
|
```
|
|
|
|
## Submitting Changes
|
|
|
|
**One PR — one topic.** Do not bundle unrelated changes in a single pull
|
|
request. Small, focused PRs are reviewed faster and are easier to revert if
|
|
needed.
|
|
|
|
1. Fork the repository and create a branch from `main`.
|
|
2. Make your changes, keeping the scope focused.
|
|
3. Run all relevant tests locally (see above).
|
|
4. Open a pull request using the PR template — fill in **all sections**,
|
|
including what was *not* tested and why.
|
|
|
|
## What Not to Change
|
|
|
|
See [`TASK.md`](TASK.md) and inline comments in the codebase for files that
|
|
are currently locked by parallel work streams. When in doubt, ask in the issue
|
|
or PR before making changes to files in `src/`, `deploy/`, or `tests/`.
|