Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

216
Views
use of hardcoded password error in checkmarx
exports.authorizePassword = function(auth) {
            return function(_ref2) {
                var authActions = _ref2.authActions,
                    schema = auth.schema,
                    name = auth.name,
                    username = auth.username,
                    password = auth.password,
                    passwordType = auth.passwordType,
                    clientId = auth.clientId,
                    clientSecret = auth.clientSecret,
                    form = {
                        grant_type: "password",
                        scope: auth.scopes.join(" ")
                    }, query = {}, headers = {};
                return "basic" === passwordType ? headers.Authorization = "Basic " + (0, _utils.btoa)(username + ":" + password) : ((0, _assign2.
                default)(form, {
                    username: username
                }, {
                    password: password
                }), "query" === passwordType ? (clientId && (query.client_id = clientId), clientSecret && (query.client_secret = clientSecret)) : headers.Authorization = "Basic " + (0, _utils.btoa)(clientId + ":" + clientSecret)), authActions.authorizeRequest({
                    body: (0, _utils.buildFormData)(form),
                    url: schema.get("tokenUrl"),
                    name: name,
                    headers: headers,
                    query: query,
                    auth: auth
                })
            }

This is my code and checkmarx gives error near this line return "basic" === passwordType says use of hard coded password. There's no hardcoded password anywhere. Please help

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!