Skip to content

GH-782: Implement ability to use sanctioned executable paths#783

Merged
ascopes merged 5 commits into
mainfrom
feature/gh-782-sanctioned-executable-paths
Sep 3, 2025
Merged

GH-782: Implement ability to use sanctioned executable paths#783
ascopes merged 5 commits into
mainfrom
feature/gh-782-sanctioned-executable-paths

Conversation

@ascopes
Copy link
Copy Markdown
Owner

@ascopes ascopes commented Aug 30, 2025

If you operate in an overly locked-down corporate environment that disallows running shell/batch scripts or native executables outside sanctioned locations on your local file system, you can specify the path here either via this configuration parameter or via a property such that any executables are first moved to a directory within this location. This is designed to be able to be used within a Maven profile if desired.

Addresses GH-782.


TODO:

  • implementation
  • new integration tests
  • documentation for user guide
  • documentation for parameter in goal reference
  • check if we want to name the parameter differently or leave it as it is?
  • AbstractGenerateMojo unit tests
  • TemporarySpace unit tests
  • AbstractTemporaryLocationProvider unit tests
  • SanctionedExecutableTransformer unit tests

@ascopes ascopes added this to the v3.9.x milestone Aug 30, 2025
@ascopes ascopes self-assigned this Aug 30, 2025
@ascopes ascopes added the new feature A new user-facing feature. label Aug 30, 2025
@ascopes ascopes force-pushed the feature/gh-782-sanctioned-executable-paths branch 4 times, most recently from ad9a5d8 to 0b388f4 Compare August 31, 2025 11:07
@ascopes
Copy link
Copy Markdown
Owner Author

ascopes commented Aug 31, 2025

Windows failures are caused by https://bugs.openjdk.org/browse/JDK-8315405. Looks like I'm going to have to maybe make a separate fix to deal with this first to reduce directory name length, or have a caveat that long path names are not supported on Windows. One to do separately.

I believe https://bugs.openjdk.org/browse/JDK-8348664 would avoid this eventually should it get implemented.

@ascopes ascopes force-pushed the feature/gh-782-sanctioned-executable-paths branch 2 times, most recently from aeeed70 to a68234f Compare August 31, 2025 15:45
@ascopes ascopes changed the title GH-782: Implement ability to use sanctioned executable paths. GH-782: Implement ability to use sanctioned executable paths Aug 31, 2025
@ascopes ascopes force-pushed the feature/gh-782-sanctioned-executable-paths branch from a68234f to 1362f4e Compare August 31, 2025 15:49
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.80%. Comparing base (07025ed) to head (933c08b).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #783      +/-   ##
==========================================
+ Coverage   91.60%   91.80%   +0.21%     
==========================================
  Files          58       60       +2     
  Lines        1772     1817      +45     
  Branches      118      121       +3     
==========================================
+ Hits         1623     1668      +45     
  Misses        111      111              
  Partials       38       38              
Files with missing lines Coverage Δ
...enplugin/fs/AbstractTemporaryLocationProvider.java 100.00% <100.00%> (ø)
...ascopes/protobufmavenplugin/fs/TemporarySpace.java 100.00% <100.00%> (ø)
...enplugin/generation/ProtobufBuildOrchestrator.java 89.02% <100.00%> (+0.07%) ⬆️
...protobufmavenplugin/mojo/AbstractGenerateMojo.java 100.00% <100.00%> (ø)
...pes/protobufmavenplugin/protoc/ProtocExecutor.java 87.26% <100.00%> (+0.26%) ⬆️
...mavenplugin/protoc/targets/PluginProtocTarget.java 100.00% <ø> (ø)
...rotoc/targets/SanctionedExecutableTransformer.java 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

If you operate in an overly locked-down corporate environment that disallows running
shell/batch scripts or native executables outside sanctioned locations on your local
file system, you can specify the path here either via this configuration parameter
or via a property such that any executables are first moved to a directory within this
location. This is designed to be able to be used within a Maven profile if desired.
@ascopes ascopes force-pushed the feature/gh-782-sanctioned-executable-paths branch from 1362f4e to 359c74f Compare August 31, 2025 16:27
@ascopes ascopes force-pushed the feature/gh-782-sanctioned-executable-paths branch from 6071d83 to 933c08b Compare September 1, 2025 07:47
@ascopes ascopes removed this from the v3.9.x milestone Sep 1, 2025
@cdprete
Copy link
Copy Markdown
Contributor

cdprete commented Sep 2, 2025

@ascopes any plans to release this or is there still something blocking it?

@ascopes
Copy link
Copy Markdown
Owner Author

ascopes commented Sep 2, 2025

A couple of unit tests still need writing, but I probably wont have time to look at this until Saturday as I am working all week.

Edit: apologies if this sent several times. GitHub appears to be playing up.

@cdprete
Copy link
Copy Markdown
Contributor

cdprete commented Sep 2, 2025 via email

@ascopes
Copy link
Copy Markdown
Owner Author

ascopes commented Sep 3, 2025

@cdprete what I will do for now is merge this as the test I need to write is already being covered by an integration test. I'll get 3.9.0 released now and then finish that bit when I have time.

That should unblock you. Expect a release on Maven Central by approx 8:00 GMT today 👍🏻

Thanks for baring with me.

@ascopes ascopes marked this pull request as ready for review September 3, 2025 07:15
@ascopes ascopes merged commit c8d66be into main Sep 3, 2025
18 checks passed
@ascopes ascopes deleted the feature/gh-782-sanctioned-executable-paths branch September 3, 2025 07:15
@cdprete
Copy link
Copy Markdown
Contributor

cdprete commented Sep 3, 2025 via email

mergify Bot added a commit to ArcadeData/arcadedb that referenced this pull request Sep 14, 2025
…to 3.9.0 [skip ci]

Bumps [io.github.ascopes:protobuf-maven-plugin](https://github.com/ascopes/protobuf-maven-plugin) from 3.8.0 to 3.9.0.
Release notes

*Sourced from [io.github.ascopes:protobuf-maven-plugin's releases](https://github.com/ascopes/protobuf-maven-plugin/releases).*

> v3.9.0
> ------
>
> What's Changed
> --------------
>
> * Log non-fatal dependency warnings as debug warnings by [`@​ascopes`](https://github.com/ascopes) in [ascopes/protobuf-maven-plugin#787](https://redirect.github.com/ascopes/protobuf-maven-plugin/pull/787)
> * [GH-782](https://redirect.github.com/ascopes/protobuf-maven-plugin/issues/782): Implement ability to use sanctioned executable paths by [`@​ascopes`](https://github.com/ascopes) in [ascopes/protobuf-maven-plugin#783](https://redirect.github.com/ascopes/protobuf-maven-plugin/pull/783)
>
> **Full Changelog**: <ascopes/protobuf-maven-plugin@v3.8.2...v3.9.0>
>
> v3.8.2
> ------
>
> What's Changed
> --------------
>
> * Enable parallel test execution in junit-platform.properties by [`@​ascopes`](https://github.com/ascopes) in [ascopes/protobuf-maven-plugin#779](https://redirect.github.com/ascopes/protobuf-maven-plugin/pull/779)
> * Fix a bug in digest hex representations for byte values <10 by [`@​ascopes`](https://github.com/ascopes) in [ascopes/protobuf-maven-plugin#784](https://redirect.github.com/ascopes/protobuf-maven-plugin/pull/784)
> * At the time of writing, two OpenJDK bugs exist that cause us hassle on Windows by [`@​ascopes`](https://github.com/ascopes) in [ascopes/protobuf-maven-plugin#786](https://redirect.github.com/ascopes/protobuf-maven-plugin/pull/786)
>
> **Full Changelog**: <ascopes/protobuf-maven-plugin@v3.8.1...v3.8.2>
>
> v3.8.1
> ------
>
> What's Changed
> --------------
>
> * Bump com.google.protobuf:protobuf-bom from 4.31.1 to 4.32.0 by [`@​dependabot`](https://github.com/dependabot)[bot] in [ascopes/protobuf-maven-plugin#767](https://redirect.github.com/ascopes/protobuf-maven-plugin/pull/767)
> * Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.2 to 3.11.3 by [`@​dependabot`](https://github.com/dependabot)[bot] in [ascopes/protobuf-maven-plugin#768](https://redirect.github.com/ascopes/protobuf-maven-plugin/pull/768)
> * Bump kotlin.version from 2.2.0 to 2.2.10 in /protobuf-maven-plugin/src/it/setup by [`@​dependabot`](https://github.com/dependabot)[bot] in [ascopes/protobuf-maven-plugin#770](https://redirect.github.com/ascopes/protobuf-maven-plugin/pull/770)
> * Bump org.mockito:mockito-bom from 5.18.0 to 5.19.0 by [`@​dependabot`](https://github.com/dependabot)[bot] in [ascopes/protobuf-maven-plugin#769](https://redirect.github.com/ascopes/protobuf-maven-plugin/pull/769)
> * Fix parameter naming in IncrementalCacheManager.java by [`@​ascopes`](https://github.com/ascopes) in [ascopes/protobuf-maven-plugin#771](https://redirect.github.com/ascopes/protobuf-maven-plugin/pull/771)
> * [GH-772](https://redirect.github.com/ascopes/protobuf-maven-plugin/issues/772): Pin resolver API to v1.9.24 by [`@​ascopes`](https://github.com/ascopes) in [ascopes/protobuf-maven-plugin#773](https://redirect.github.com/ascopes/protobuf-maven-plugin/pull/773)
> * Bump actions/setup-java from 4 to 5 by [`@​dependabot`](https://github.com/dependabot)[bot] in [ascopes/protobuf-maven-plugin#774](https://redirect.github.com/ascopes/protobuf-maven-plugin/pull/774)
> * Group dependabot PRs to a single PR by [`@​ascopes`](https://github.com/ascopes) in [ascopes/protobuf-maven-plugin#778](https://redirect.github.com/ascopes/protobuf-maven-plugin/pull/778)
> * Bump io.grpc:grpc-bom from 1.74.0 to 1.75.0 in /protobuf-maven-plugin/src/it/setup by [`@​dependabot`](https://github.com/dependabot)[bot] in [ascopes/protobuf-maven-plugin#777](https://redirect.github.com/ascopes/protobuf-maven-plugin/pull/777)
> * Bump com.google.api.grpc:proto-google-common-protos from 2.60.0 to 2.61.0 in /protobuf-maven-plugin/src/it/setup by [`@​dependabot`](https://github.com/dependabot)[bot] in [ascopes/protobuf-maven-plugin#776](https://redirect.github.com/ascopes/protobuf-maven-plugin/pull/776)
> * Bump actions/upload-pages-artifact from 3 to 4 by [`@​dependabot`](https://github.com/dependabot)[bot] in [ascopes/protobuf-maven-plugin#775](https://redirect.github.com/ascopes/protobuf-maven-plugin/pull/775)
>
> **Full Changelog**: <ascopes/protobuf-maven-plugin@v3.8.0...v3.8.1>


Commits

* [`f9a5918`](ascopes/protobuf-maven-plugin@f9a5918) [maven-release-plugin] prepare release v3.9.0
* [`c8d66be`](ascopes/protobuf-maven-plugin@c8d66be) Merge pull request [#783](https://redirect.github.com/ascopes/protobuf-maven-plugin/issues/783) from ascopes/feature/gh-782-sanctioned-executable-paths
* [`933c08b`](ascopes/protobuf-maven-plugin@933c08b) [GH-782](https://redirect.github.com/ascopes/protobuf-maven-plugin/issues/782): Update user guide with details on using sanctioned executable paths
* [`606afc3`](ascopes/protobuf-maven-plugin@606afc3) [GH-782](https://redirect.github.com/ascopes/protobuf-maven-plugin/issues/782): Add test for sanctionedExecutablePath to AbstractGenerateMojo tests
* [`980fcbe`](ascopes/protobuf-maven-plugin@980fcbe) [GH-782](https://redirect.github.com/ascopes/protobuf-maven-plugin/issues/782): Document that sanctioned executables reside in subdirectories
* [`a5642e8`](ascopes/protobuf-maven-plugin@a5642e8) [GH-782](https://redirect.github.com/ascopes/protobuf-maven-plugin/issues/782): Fix logged path for sanctioned executable paths
* [`359c74f`](ascopes/protobuf-maven-plugin@359c74f) [GH-782](https://redirect.github.com/ascopes/protobuf-maven-plugin/issues/782): Implement ability to use sanctioned executable paths.
* [`07025ed`](ascopes/protobuf-maven-plugin@07025ed) Merge pull request [#787](https://redirect.github.com/ascopes/protobuf-maven-plugin/issues/787) from ascopes/task/log-non-fatal-dependency-warnings-a...
* [`41fc11b`](ascopes/protobuf-maven-plugin@41fc11b) Log non-fatal dependency warnings as debug warnings
* [`1146a23`](ascopes/protobuf-maven-plugin@1146a23) [maven-release-plugin] prepare for next development iteration
* Additional commits viewable in [compare view](ascopes/protobuf-maven-plugin@v3.8.0...v3.9.0)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=io.github.ascopes:protobuf-maven-plugin&package-manager=maven&previous-version=3.8.0&new-version=3.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature A new user-facing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: allow changing where artifacts are saved to comply with corporate policies

2 participants