jfrog / jfrog/frogbot

Syntax error in template from "Setup Frogbot Using Azure Pipelines"

Open
#794 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
372
Forks
107
Avg merge
2d 20h
Merged PRs (30d)
5

Description

Describe the bug

The template "Scanning repository branches and fixing issues" in the documentation Setup Frogbot Using Azure Pipelines doesn't work, if someone wants to use user / password instead of the access token.

         env:
            # [Mandatory]
            # JFrog platform URL (This functionality requires version 3.29.0 or above of Xray)
            JF_URL: $(JF_URL)

            # [Mandatory if JF_USER and JF_PASSWORD are not provided]
            # JFrog access token with 'read' permissions for Xray
            JF_ACCESS_TOKEN: $(JF_ACCESS_TOKEN)

            # [Mandatory if JF_ACCESS_TOKEN is not provided]
            # JFrog user and password with 'read' permissions for Xray
            # JF_USER: $JF_USER
            # JF_PASSWORD: $JF_PASSWORD

            # [Mandatory]
            # Azure Repos personal access token with Code -> Read & Write permissions
            JF_GIT_TOKEN: $(JF_GIT_TOKEN)
            ...

The normal behavoir would be to add the # before the line with the JF_ACCESS_TOKEN and remove it for JF_USER and JF_PASSWORD, but this won't work ...

I got always an 401 error "Bad Credentials":

08:02:06 [Info] Running Frogbot "scan-repository" command
08:02:07 [Error] got unexpected server response while attempting to get JFrog Xray entitlements response for contextual_analysis:
server response: 401 Unauthorized
{
  "error": "Bad Credentials"
}

The problem is, that the brackets are missing in the commented lines. Please fix that in the docs.


            # --- This is the snippet from the template:
            # JF_USER: $JF_USER
            # JF_PASSWORD: $JF_PASSWORD

            # --- If a user only uncomments this lines, the usage of the variables has a syntax error!
            JF_USER: $JF_USER
            JF_PASSWORD: $JF_PASSWORD

            # --- You have to add the brackets: $(...)
            JF_USER: $(JF_USER)
            JF_PASSWORD: $(JF_PASSWORD)

Current behavior

Pipeline ends with error.

Reproduction steps

No response

Expected behavior

No response

JFrog Frogbot version
Package manager info
Git provider

Azure DevOps

JFrog Frogbot configuration yaml file

No response

Operating system type and version
JFrog Xray version

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the linked Setup Frogbot Using Azure Pipelines documentation and find the “Scanning repository branches and fixing issues” template. Check the JF_USER and JF_PASSWORD examples against Azure Pipelines variable syntax, then update the snippet so uncommenting the user/password option works and verify the access-token option remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.