Skip to content

Adapt shouldParseRunParameter test to Jenkins 2.551#309

Merged
jimklimov merged 1 commit into
jenkinsci:masterfrom
MarkEWaite:adapt-test-to-jenkins-2.551
Mar 10, 2026
Merged

Adapt shouldParseRunParameter test to Jenkins 2.551#309
jimklimov merged 1 commit into
jenkinsci:masterfrom
MarkEWaite:adapt-test-to-jenkins-2.551

Conversation

@MarkEWaite

Copy link
Copy Markdown
Contributor

Adapt shouldParseRunParameter test to Jenkins 2.551

This commit in Jenkins 2.551 fixes Build information disclosure vulnerability through Run Parameter.

That change requires that the build must exist before RunParameterValue is allowed to access the value of a parameter.

This test is already using mock objects extensively. Allow the RunParameterValue job existence check to be skipped for one method call in shouldParseRunParameter so that the test does not need to be reworked to create and run a parameterized build.

Detected in plugin BOM pull request:

Needs to be merged and released before Jenkins 2.551 can be included in the plugin BOM. If not merged and released within the next few days, the BuildCommandTest will be ignored in plugin BOM so that the weekly plugin BOM can be released.

Testing done

  • mvn clean -Djenkins.version=2.551 -Dtest=BuildCommandTest test fails without this change
  • mvn clean -Djenkins.version=2.551 -Dtest=BuildCommandTest test passes with this change
  • mvn clean -Dtest=BuildCommandTest test passes with or without this change

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@MarkEWaite
MarkEWaite requested a review from a team as a code owner February 18, 2026 20:06
jenkinsci/jenkins@f92eadb
in Jenkins 2.551 fixes
Build information disclosure vulnerability through Run Parameter
https://www.jenkins.io/security/advisory/2026-02-18/index.html#SECURITY-3658

That change requires that the build must exist before RunParameterValue
is allowed to access the value of a parameter.

This test is already using mock objects extensively.  Allow the
RunParameterValue job existence check to be skipped for one method call
in shouldParseRunParameter so that the test does not need to be reworked
to create and run a parameterized build.

Detected in plugin BOM pull request:

* jenkinsci/bom#6379

Testing done:

* `mvn clean -Djenkins.version=2.551 -Dtest=BuildCommandTest test` fails without this change
* `mvn clean -Djenkins.version=2.551 -Dtest=BuildCommandTest test` passes with this change
* `mvn clean -Dtest=BuildCommandTest test` passes with or without this change
MarkEWaite added a commit to MarkEWaite/bom that referenced this pull request Feb 18, 2026
MarkEWaite added a commit to jenkinsci/bom that referenced this pull request Feb 18, 2026
renovate Bot added a commit to jenkinsci/bom that referenced this pull request Feb 19, 2026
* Update dependency org.jenkins-ci.main:jenkins-war to v2.551

* Exclude instant-messaging test

Fixed by pull request:

* jenkinsci/instant-messaging-plugin#309

* Remove blue ocean leftovers

Blue ocean is no longer tested with BOM

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mark Waite <[email protected]>

@jimklimov jimklimov 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.

LGTM, thanks (and sorry about the delay)!

@jimklimov jimklimov added the java Pull requests that update Java code label Mar 10, 2026
@jimklimov
jimklimov merged commit ccece34 into jenkinsci:master Mar 10, 2026
18 checks passed
@MarkEWaite
MarkEWaite deleted the adapt-test-to-jenkins-2.551 branch March 11, 2026 04:40
@MarkEWaite

Copy link
Copy Markdown
Contributor Author

LGTM, thanks (and sorry about the delay)!

Thanks. It needs a release of the plugin so that the new release can be included in the plugin BOM and the test exclusion can be removed from the plugin BOM.

@jimklimov

Copy link
Copy Markdown
Contributor

Action launched now. I hoped labeling the PR would cause that automatically :)

@jimklimov

Copy link
Copy Markdown
Contributor

Should ircbot be re-released with dependency on this new IM release too?

@MarkEWaite

Copy link
Copy Markdown
Contributor Author

You need to label it developer or `enhancement'.

No need for a new release of the dependent plugin.

MarkEWaite added a commit to jenkinsci/bom that referenced this pull request Mar 25, 2026
renovate Bot added a commit to jenkinsci/bom that referenced this pull request Mar 25, 2026
* Update dependency org.jenkins-ci.main:jenkins-war to v2.556

* Revert "Update dependency org.jenkins-ci.plugins:credentials to v1497 (#6503)"

Fails git plugin test for credentials tracking.  May cause other failures as well.

This reverts commit 36c2bff.

* Revert "Update dependency org.jenkins-ci.plugins:credentials to v1495 (#6494)"

This reverts commit d249ed6.

* Exclude +hudson.matrix.MatrixProjectTest.deletedLocked*

* Use correct syntax for test exclusion

* Stop exclusing instant-messaging test failure

jenkinsci/instant-messaging-plugin#309 released

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mark Waite <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants