jfrog / jfrog/jfrog-cli-security

JFrog Build Scan - "Build is not selected for indexing" Error

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

Nobody has claimed this yet.

Dominant language
Go
Stars
13
Forks
50
Avg merge
3d 48m
Merged PRs (30d)
26

Description

We are facing an issue while running the JFrog Build Scan command in our CI/CD pipeline:

jf build-scan ${{ inputs.JFROG_BUILD_NAME }} ${{ github.run_number }} --fail=${{ inputs.JFROG_FAIL_ON_SCAN }}

1st run error:

jf rt build-publish <build-name> <build-number>
jf build-scan <build-name> <build-number> --fail=false
shell: /usr/bin/bash -e {0}
env:
  JFROG_CLI_ENV_EXCLUDE: *password*;*secret*;*key*;*token*;*auth*;JF_ARTIFACTORY_*;JF_ENV_*;JF_URL;JF_USER;JF_PASSWORD;JF_ACCESS_TOKEN
  JFROG_CLI_OFFER_CONFIG: false
  JFROG_CLI_BUILD_NAME: CI CD
  JFROG_CLI_BUILD_NUMBER: <build-number>
  JFROG_CLI_BUILD_URL: <github-actions-url>
  JFROG_CLI_USER_AGENT: setup-jfrog-cli-github-action/4.5.6
  JFROG_CLI_BUILD_PROJECT: <project-name>
  JFROG_CLI_COMMAND_SUMMARY_OUTPUT_DIR: /home/runner/_work/_temp
  JFROG_CLI_USAGE_GIT_REPO: <repo-name>
  JFROG_CLI_USAGE_JOB_ID: CI CD
  JFROG_CLI_USAGE_RUN_ID: <run-id>
  JFROG_CLI_USAGE_GH_TOKEN_FOR_CODE_SCANNING_ALERTS_PROVIDED: true
  JFROG_CLI_USAGE_CONFIG_OIDC: 
  JFROG_CLI_USAGE_OIDC_USED: FALSE
  SETUP_JFROG_CLI_SERVER_IDS: setup-jfrog-cli-server
##[debug]/usr/bin/bash -e /home/runner/_work/_temp/<script-id>.sh
08:59:46 [Info] Publishing build info for <build-name>/<build-number>...
08:59:46 [Info] Build info successfully deployed. Browse it in Artifactory under <artifactory-url>/ui/builds/<build-name>/<build-number>/<timestamp>/published?buildRepo=<repo-name>&projectKey=<project-key>
{
  "status": "success",
  "totals": {
    "success": 1,
    "failure": 0
  },
  "files": [
    {
      "sha256": "a95b3e4ef9dee1957af18ba0a75ec0af5e75e3dfea775d03d880b31e2fb05c9d"
    }
  ]
}
08:59:46 [Info] Trace ID for JFrog Platform logs: <trace-id>
Error: 6 [Error] Build <build-name> is not selected for indexing
Error: Process completed with exit code 1.

2nd run error:

09:19:33 [Info] Publishing build info for <build-name>/<build-number>...
09:19:33 [Info] Build info successfully deployed. Browse it in Artifactory under 

/<build-number>/<timestamp>/published?buildRepo=<repo-name>&projectKey=xxxxx

{
  "status": "success",
  "totals": {
    "success": 1,
    "failure": 0
  },
  "files": [
    {
      "sha256": "fa47734e4a3a52370ee3ec611ce0709741dc69e8596cf1f245c4c6b2ac95f767"
    }
  ]
}
09:19:33 [Info] Trace ID for JFrog Platform logs: 18fdaf42c4776821
Error: 3 [Error] No Xray “Fail build in case of a violation” policy rule has been defined on this build. The Xray scan will run in parallel to the deployment of the build and will not obstruct the build. To review the Xray scan results, see the Xray Violations tab in the UI.
Error: Process completed with exit code 1.

Could you please clarify what causes this error?
Is there any specific configuration required on the JFrog platform (e.g., Artifactory, Xray, permissions, or indexing settings) to enable build indexing?

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

Start by reviewing the reported jf rt build-publish and jf build-scan command output and the JFrog platform configuration referenced in the issue. Determine whether build indexing, Xray policy rules, permissions, or another setting explains each error; done means documenting the confirmed cause and required configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.