jenkinsci / jenkinsci/credentials-binding-plugin

[JENKINS-43264] NullPointerException when credentialsId is null

Open
#441 2 comments 0 reactions 0 assignees View on GitHub
component:credentials-binding-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
57
Forks
108
PR merge metrics
No merged PRs in 30d

Description

with the following:

{{   steps {}}

{{     withCredentials([}}

{{       string(credentialsId: params.GITHUB_PASSWORD, variable: 'GITHUB_PASSWORD'),}}

{{       string(credentialsId: params.GITHUB_APP_SECRET, variable: 'GITHUB_APP_SECRET')}}

    ]) {

      ansiblePlaybook(    {{      }}

        ...

      )

{{    }}}

{{  }}}

 

if param.GITHUB_PASSWORD is null (not defined), a NullPointerException is raised.

The code in com.cloudbees.plugins.credentials.CredentialsProvider.findCredentialById should check for null value of id and provide a more useful message than a stacktrace.

 

 

---
Originally reported by jouve, imported from: NullPointerException when credentialsId is null


  • status: Open
  • priority: Minor
  • component(s): credentials-binding-plugin
  • label(s): diagnostics
  • resolution: Unresolved
  • votes: 0
  • watchers: 4
  • imported: 20251211-141027

Raw content of original issue

with the following:
{{   steps {}}
{{     withCredentials([}}
{{       string(credentialsId: params.GITHUB_PASSWORD, variable: 'GITHUB_PASSWORD'),}}
{{       string(credentialsId: params.GITHUB_APP_SECRET, variable: 'GITHUB_APP_SECRET')}}
    ]) {
      ansiblePlaybook(    {{      }}
        ...
      )
{{    }}}
{{  }}}

 

if param.GITHUB_PASSWORD is null (not defined), a NullPointerException is raised.

The code in com.cloudbees.plugins.credentials.CredentialsProvider.findCredentialById should check for null value of id and provide a more useful message than a stacktrace.

 

 

  • environment: see attached about.html

1 attachment

- [about.html](https://issues.jenkins.io/secure/attachment/36840/about.html)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.