Skip to content

build(agent): update now-policy-api to 0.3.1 - #1928

Merged
Vladyslav Nikonov (vnikonov-devolutions) merged 1 commit into
masterfrom
vnikonov-devolutions-broker-identifier-validation-tests
Aug 13, 2026
Merged

build(agent): update now-policy-api to 0.3.1#1928
Vladyslav Nikonov (vnikonov-devolutions) merged 1 commit into
masterfrom
vnikonov-devolutions-broker-identifier-validation-tests

Conversation

@vnikonov-devolutions

@vnikonov-devolutions Vladyslav Nikonov (vnikonov-devolutions) commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Updates now-policy-api to 0.3.1, which relaxes the PackageIdentifier wire validation to an allowlist admitting scoped npm identifiers (@scope/package), npm aliases (alias:@scope/package@1.2.3), and vcpkg triplets (curl:x64-windows). These identifier forms are already supported by the broker command builders but were previously rejected during request deserialization by 0.3.0.

@github-actions

Copy link
Copy Markdown

Let maintainers know that an action is required on their side

  • Add the label release-required Please cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module) when you request a maintainer to cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module)

  • Add the label release-blocker Follow-up is required before cutting a new release if a follow-up is required before cutting a new release

  • Add the label publish-required Please publish libraries (`Devolutions.Gateway.Utils`, OpenAPI clients, etc) when you request a maintainer to publish libraries (Devolutions.Gateway.Utils, OpenAPI clients, etc.)

  • Add the label publish-blocker Follow-up is required before publishing libraries if a follow-up is required before publishing libraries

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates broker tests to validate package identifiers through PackageIdentifier::parse, while retaining direct construction for defense-in-depth cases.

Changes:

  • Validates positive-path test identifiers using wire-equivalent parsing.
  • Documents intentional validation bypasses in malicious-input tests.
  • Adds control-character rejection coverage.
  • Currently blocked by now-policy-api 0.3.1 availability and lockfile update.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
devolutions-agent/src/broker/server/mod.rs Parses the server test identifier.
devolutions-agent/src/broker/evaluator/tests.rs Parses evaluator test identifiers.
devolutions-agent/src/broker/evaluator/matching.rs Parses the matching fixture identifier.
devolutions-agent/src/broker/evaluator/constraints.rs Parses the constraints fixture identifier.
devolutions-agent/src/broker/command_builder/winget.rs Parses the WinGet identifier.
devolutions-agent/src/broker/command_builder/vcpkg.rs Validates vcpkg identifiers and documents bypass cases.
devolutions-agent/src/broker/command_builder/scoop.rs Parses the Scoop identifier.
devolutions-agent/src/broker/command_builder/powershell.rs Parses PowerShell package identifiers.
devolutions-agent/src/broker/command_builder/pip.rs Parses valid pip identifiers and documents malicious cases.
devolutions-agent/src/broker/command_builder/npm.rs Validates npm aliases and control-character rejection.
devolutions-agent/src/broker/command_builder/dotnet.rs Parses the .NET package identifier.
devolutions-agent/src/broker/command_builder/chocolatey.rs Parses the Chocolatey identifier.
devolutions-agent/src/broker/command_builder/cargo.rs Parses Cargo test identifiers.
devolutions-agent/src/broker/command_builder/bun.rs Validates scoped Bun identifiers.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread devolutions-agent/src/broker/command_builder/npm.rs Outdated
@vnikonov-devolutions
Vladyslav Nikonov (vnikonov-devolutions) force-pushed the vnikonov-devolutions-broker-identifier-validation-tests branch from 1e10426 to e1c411c Compare August 13, 2026 14:58
@vnikonov-devolutions Vladyslav Nikonov (vnikonov-devolutions) changed the title test(agent): validate broker package ids over the wire build(agent): update now-policy-api to 0.3.1 Aug 13, 2026
@vnikonov-devolutions
Vladyslav Nikonov (vnikonov-devolutions) marked this pull request as ready for review August 13, 2026 15:21
@vnikonov-devolutions
Vladyslav Nikonov (vnikonov-devolutions) force-pushed the vnikonov-devolutions-broker-identifier-validation-tests branch from e1c411c to 0fca202 Compare August 13, 2026 15:28
The 0.3.1 release relaxes the PackageIdentifier wire validation to an
allowlist admitting scoped npm identifiers, npm aliases, and vcpkg
triplets, which the broker command builders already support.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@vnikonov-devolutions
Vladyslav Nikonov (vnikonov-devolutions) force-pushed the vnikonov-devolutions-broker-identifier-validation-tests branch from 0fca202 to 52ec527 Compare August 13, 2026 17:45
@vnikonov-devolutions
Vladyslav Nikonov (vnikonov-devolutions) merged commit 6bfe09d into master Aug 13, 2026
42 checks passed
@vnikonov-devolutions
Vladyslav Nikonov (vnikonov-devolutions) deleted the vnikonov-devolutions-broker-identifier-validation-tests branch August 13, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants