undergroundwires f4a74f058d win: improve soft file/app delete security #260
This commit improves soft file delete logic:

- Unify logic for soft deleting single files and system apps.
- Rename `RenameSystemFile` templating function to `SoftDeleteFiles` so
  new name gives clarity to:
   - It's not necessarily single file being renamed but can be multiple
     files.
   - It's not necessarily system files being renamed, but can also work
     without granting extra permissions.
- Grant permissions for only files that will be backed up, skipping
  unnecessarily granting permissions to folders/other files. Both
  `SeRestorePrivilege` and `SeTakeownershipPrivileges` are claimed and
  revoked as necessary.
- Make granting permissions optional through `grantPermissions`
  parameter. Do not take permissions if not needed.
- Restore permissions to system default after file is renamed. Before
  both deletion of system apps and renaming system files did not restore
  their original permissions. This might leave user computers
  vulnerable, which is fixed in this commit. It ensures that the
  system's original security posture is preserved.
- Deleting system apps is now independent of `Get-AppxPackage`,
  improving its robustness and enabling their execution once system apps
  are hard-deleted (#260)
- Introduce common way to share glob iteration logic of how the
  directories are being cleaned up. It reuses most of the logic from
  former `DeleteGlob` with some improvements:
  - Simplify call to `Get-ChildItem` by avoiding `-Filter` parameter.
  - Improve reliability of getting parent directory in `DeleteGlob`
    sanity check to use .NET's `[System.IO.Path]` methods.
2023-10-26 18:35:39 +02:00
2022-10-09 22:38:35 +02:00
2020-08-09 03:00:13 +01:00
2023-10-14 14:17:25 +00:00
2023-10-16 02:06:19 +02:00
2023-09-08 16:52:41 +02:00
2023-10-14 14:17:25 +00:00

privacy.sexy — Now you have the choice

Enforce privacy & security best-practices on Windows, macOS and Linux, because privacy is sexy 🍑🍆

donation badge contributions are welcome Maintainability
Unit tests status Integration tests status E2E tests status
Status of dependency security checks Status of Static Analysis Security Testing (SAST)
Quality checks status Status of build checks Status of runtime error checks for the desktop application Status of script checks Status of external URL checks
Git release status Site release status Desktop application release status
Auto-versioned by bump-everywhere

Get started

Online version does not require to run any software on your computer. Offline version has more functions such as running the scripts directly.

💡 You should apply your configuration from time to time (more than once). It would strengthen your privacy and security control because privacy.sexy and its scripts get better and stronger in every new version.

privacy.sexy application

Features

  • Rich: Hundreds of scripts that aims to give you control of your data.
  • Free: Both free as in "beer" and free as in "speech".
  • Transparent. Have full visibility into what the tweaks do as you enable them.
  • Reversible. Revert if something feels wrong.
  • Accessible. No need to run any compiled software on your computer with web version.
  • Open. What you see as code in this repository is what you get. The application itself, its infrastructure and deployments are open-source and automated thanks to bump-everywhere.
  • Tested. A lot of tests. Automated and manual. Community-testing and verification. Stability improvements comes before new features.
  • Extensible. Effortlessly extend scripts with a custom designed templating language.
  • Portable and simple. Every script is independently executable without cross-dependencies.

Support

Sponsor 💕. Consider sponsoring on GitHub Sponsors, or you can donate using other ways such as crypto or a coffee.

Star 🤩. Feel free to give it a star .

Contribute 👷. Contributions of any type are welcome. See CONTRIBUTING.md as the starting point. It includes useful information like how to add new scripts.

Additional Install Options

  • Check the releases page for all available versions.

  • Using Scoop package manager on Windows:

      scoop bucket add extras
      scoop install privacy.sexy
    

Development

Refer to development.md for Docker usage and reading more about setting up your development environment.

Check architecture.md for an overview of design and how different parts and layers work together. You can refer to application.md for a closer look at application layer codebase and presentation.md for code related to GUI layer. collection-files.md explains the YAML files that are the core of the application and templating.md documents how to use templating language in those files. In ci-cd.md, you can read more about the pipelines that automates maintenance tasks and ensures you get what see.

docs/ folder includes all other documentation.

Security

Security is a top priority at privacy.sexy. An extensive commitment to security verification ensures this priority. For any security concerns or vulnerabilities, please consult the Security Policy.

Languages
TypeScript 91.5%
Vue 6.3%
JavaScript 0.9%
SCSS 0.8%
Python 0.4%