update
This commit is contained in:
@@ -128,8 +128,8 @@ class AptInstaller(DebInstaller):
|
||||
def discover_service_units(self, package_name: str) -> list[str]:
|
||||
"""Return concrete systemd service units shipped by an installed package.
|
||||
|
||||
The package name is already constrained by the Agent APT allowlist. It is
|
||||
still passed as a single argv item and no shell expansion is performed.
|
||||
The package name is already syntax-validated by the manifest validator. It
|
||||
is passed as a single argv item and no shell expansion is performed.
|
||||
Template units are omitted because they cannot be meaningfully checked
|
||||
without an instance name.
|
||||
"""
|
||||
|
||||
@@ -18,7 +18,7 @@ class ManifestValidator:
|
||||
elif component_type == "apt":
|
||||
component = AptComponent.model_validate(raw_component).model_dump(by_alias=True)
|
||||
allowed_packages = set(settings.allowed_apt_packages)
|
||||
if component["packageName"] not in allowed_packages:
|
||||
if "*" not in allowed_packages and component["packageName"] not in allowed_packages:
|
||||
raise ValueError(
|
||||
f"APT package is not allowed: {component['packageName']}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user