Skip to content

fix: remove unnecessary cap from bluetooth script#1332

Merged
RoyalOughtness merged 6 commits intosecureblue:livefrom
HastD:bluetooth-cap
Sep 13, 2025
Merged

fix: remove unnecessary cap from bluetooth script#1332
RoyalOughtness merged 6 commits intosecureblue:livefrom
HastD:bluetooth-cap

Conversation

@HastD
Copy link
Copy Markdown
Collaborator

@HastD HastD commented Sep 12, 2025

Since /etc/modprobe.d is writable by root, CAP_DAC_OVERRIDE is not needed. Also fix formatting of CapabilityBoundingSet property, improve validation of run0 options, and did some minor code cleanup/style changes:

  • Moved SandboxedFunction to __init__.py; it's few enough lines of code that there's no need for a separate submodule.
  • Improved input validation on SandboxedFunction so it will cause an error if non-list arguments are passed where a list is expected.
  • Removed unreachable code: the properties of SandboxedFunction of type list[str] cannot be None.
  • Added return type hints to all functions.
  • Removed unnecessary type hints from local variables.
  • Added shebang line to Python scripts.
  • Added missing type annotations to functions, and enforce this via Ruff lint.

Since `/etc/modprobe.d` is writable by root, `CAP_DAC_OVERRIDE` is not
needed. Also fix formatting of `CapabilityBoundingSet` property and did
some minor code cleanup/style changes:

* Moved `SandboxedFunction` to `__init__.py`; it's few enough lines of
  code that there's no need for a separate submodule.
* Removed unreachable code: the properties of `SandboxedFunction` of
  type `list[str]` cannot be `None`.
* Added return type hints to all functions.
* Removed unnecessary type hints from local variables.
* Added shebang line to Python scripts.
Also make optional arguments keyword-only to avoid them being mixed up.
@RoyalOughtness RoyalOughtness enabled auto-merge (squash) September 13, 2025 05:55
@RoyalOughtness RoyalOughtness merged commit bf4ee00 into secureblue:live Sep 13, 2025
11 of 12 checks passed
@HastD HastD deleted the bluetooth-cap branch September 13, 2025 12:19
alexvojproc pushed a commit to alexvojproc/secureblue that referenced this pull request Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants