diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..3ab6591 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## What changed + + + +## Testing + + + +- [ ] `.\Tests\Invoke-StaticValidation.ps1 -RequirePSScriptAnalyzer` +- [ ] Pester unit suites under `Tests\Unit` +- [ ] Rebuilt the standalone artifact with `.\build.ps1` (required if `Assets`, `Config`, `Regfiles`, `Schemas`, `Scripts`, or `Winnow.ps1` changed) +- [ ] Mutating integration tests in Windows Sandbox (only if the change touches an apply/rollback path) + +## Notes + + diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..6a0e7c0 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + # Keep the GitHub Actions used by the test and release workflows current. + # This is the only ecosystem Winnow depends on; the tool itself is + # dependency-free Windows PowerShell. + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + commit-message: + prefix: "" + labels: + - "dependencies" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bc20782..12780d0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,6 +47,7 @@ jobs: "README.md", "CHANGELOG.md", "CONTRIBUTING.md", + "CODE_OF_CONDUCT.md", "CREDITS.md", "SECURITY.md", "UPSTREAM.md", diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..6bbdd7e --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,126 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or advances of + any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, + without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official email address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the maintainers responsible for enforcement through a +[GitHub confidential report](https://github.com/BiosSystem/Winnow/security/advisories/new). +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), +version 2.1, available at +https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/README.md b/README.md index 16d3a6a..b45ce04 100644 --- a/README.md +++ b/README.md @@ -287,7 +287,7 @@ Use `-SkipExplorerRestart` to defer the Explorer restart. Use `-NoAutoRollback` ## 🤝 Contributing & License -Read the [Contributing Guidelines](CONTRIBUTING.md) before submitting a pull request. +Read the [Contributing Guidelines](CONTRIBUTING.md) before submitting a pull request. Participation is governed by our [Code of Conduct](CODE_OF_CONDUCT.md). Review [upstream credits](CREDITS.md) before redistributing a modified build. diff --git a/SECURITY.md b/SECURITY.md index 34b9635..ac6d41d 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -8,7 +8,8 @@ Winnow is a modular Windows 11 optimization and debloating toolkit. Because Winn | Version | Supported | Status | |---|---|---| -| `4.0.x` | Yes | Active production release for Windows 11 (24H2, 25H2). Current Winnow line | +| `4.2.x` | Yes | Active production release for Windows 11 (24H2, 25H2). Current Winnow line. 4.2.1 through 4.2.3 carry the 2026 security-hardening cycle (watchdog ACL/integrity anchor, standalone elevate-first extraction, winget argument isolation, reliable user-hive unload) | +| `4.0.x` - `4.1.x` | No | Superseded by 4.2. Predate the watchdog and standalone privilege-escalation fixes | | `3.x` | No | Superseded by 4.0. Published under the former name, WinSwift; 3.3.x and earlier also carried the elevation-guard bug fixed in 3.4.0 | | `< 3.0` | No | Legacy baseline | @@ -39,3 +40,15 @@ Report vulnerabilities securely through [GitHub Private Vulnerability Reporting] ### 6. Automatic Rollback - A failed apply restores the registry backup taken before the run instead of leaving the system half-changed. Exit code `3` reports a clean rollback, `4` reports a rollback that itself failed and names the backup file for manual recovery. + +### 7. Standalone Extraction Runs Elevated +- The single-file `Winnow-Standalone.ps1` checks for administrator rights before it unpacks anything. If not elevated it relaunches itself through UAC and only then extracts, into a fresh directory whose ACL is locked to Administrators and SYSTEM with inheritance disabled. Earlier builds extracted as the standard user and self-elevated afterward, so the elevated run dot-sourced scripts from a directory the standard user still controlled. That local privilege-escalation path is closed. + +### 8. Update Watchdog Integrity +- The optional update watchdog runs its payload as SYSTEM on a scheduled trigger. Its directory under `%ProgramData%\Winnow` carries a protected ACL (SYSTEM and Administrators full control, users read and execute, inheritance off) re-applied on every install, and the payload's SHA256 is recorded in an administrator-only `HKLM\SOFTWARE\Winnow\Watchdog` key. The payload verifies that hash before it enforces anything and fails closed if the check does not match, so a tampered payload does not run. Integrity failures and corrected drift are written to the Windows event log (source `Winnow`) for auditing. `-VerifyWatchdog` reports health read-only. + +### 9. Argument Isolation for External Tools +- The software installer passes each winget package id as a discrete argument rather than interpolating it into a single command line, so a crafted id cannot inject extra flags. The generated `autounattend.xml` XML-escapes every user-supplied value, including the embedded config path, so a legal path containing `&`, `<`, or `>` cannot break the unattend file. + +### 10. Reliable Offline Hive Handling +- Per-user and Sysprep runs that mount another profile's registry hive force a garbage collection to release lingering .NET registry handles before `reg unload`, and retry once. Earlier builds could leave the hive mounted and only warn, which risked locking the profile.