Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python files are excluded during frogbot PR Scan #642

Open
vinodhini-devops opened this issue Feb 20, 2024 · 2 comments
Open

Python files are excluded during frogbot PR Scan #642

vinodhini-devops opened this issue Feb 20, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@vinodhini-devops
Copy link

Describe the bug

I have python files and while running frogbot, those files are excluded.

21:36:04 [Debug] The path '/tmp/jfrog.cli.temp.-1708407363-3912552052/smaq/integration-tests/test_kill_relaunch_procs_smaq.py' is excluded

Current behavior

I have python files and while running frogbot, those files are excluded.

21:36:04 [Debug] The path '/tmp/jfrog.cli.temp.-1708407363-3912552052/smaq/integration-tests/test_kill_relaunch_procs_smaq.py' is excluded

Reproduction steps

No response

Expected behavior

No response

JFrog Frogbot version

Frogbot version: 2.19.9

Package manager info

No package manager

Git provider

Azure DevOps

JFrog Frogbot configuration yaml file

steps:

included comment

  • task: CmdLine@2
    condition: eq(variables['Build.Reason'], 'PullRequest')
    displayName: 'Download and Run Frogbot Scan'
    env:
    JF_WATCHES: $(xray_watch_policyname)
    JF_GIT_PULL_REQUEST_ID: $(System.PullRequest.PullRequestId)
    JF_GIT_BASE_BRANCH: $(System.PullRequest.TargetBranch)
    JF_GIT_PROJECT: $(System.TeamProject)
    JF_GIT_API_ENDPOINT: $(System.CollectionUri)
    JF_GIT_TOKEN: $(access-token-pat)
    JF_VULN_CONTEXTUAL_ANALYSIS: TRUE
    JF_URL: $(artifactoryurl)
    JF_ACCESS_TOKEN: $(jfrog-identity-token)
    JFROG_CLI_LOG_LEVEL: "DEBUG"
    JF_GIT_OWNER: "KLA-GPG"
    JF_AVOID_PREVIOUS_PR_COMMENTS_DELETION: TRUE
    JF_GIT_REPO: "virgo"
    JF_RELEASES_REPO: ""
    JF_GIT_PROVIDER: "azureRepos"
    JF_FAIL: FALSE
    JF_INCLUDE_ALL_VULNERABILITIES: FALSE
    JF_WORKING_DIR: ${{ parameters.componentName }}/${{ parameters.subcomponentname }}
    JF_AVOID_EXTRA_MESSAGES: true # to avoid extra messages in the comment from JFROG
    JF_PR_COMMENT_TITLE: ${{ parameters.componentName }}/${{ parameters.subcomponentname }}Report
    inputs:
    script: |
    export HOME="/usr/share/maven"
    export M2="$HOME/bin"
    export MAVEN_OPTS="-Xms256m -Xmx512m"
    export PATH="$M2:$PATH"
    mvn --version
    getFrogbotScriptPath=$(if [ -z "$JF_RELEASES_REPO" ]; then echo "https://releases.jfrog.io"; else echo "${JF_URL}/artifactory/${JF_RELEASES_REPO}"; fi)
    curl -fLg "$getFrogbotScriptPath/artifactory/frogbot/v2/[RELEASE]/getFrogbot.sh" | sh
    ./frogbot spr
    #./frogbot scan-and-fix-repos $(Build.SourceBranch)
    continueOnError: true

Operating system type and version

ubuntu 18.04

JFrog Xray version

No response

@vinodhini-devops vinodhini-devops added the bug Something isn't working label Feb 20, 2024
@eranturgeman
Copy link
Contributor

Hello @vinodhini-devops and thank you for using Frogbot!
The issue you reported is in fact not a bug, but rather an intended behavior.
There is a default exclude pattern for Frogbot if you don't set your own excluded pattern using JF_PATH_EXCLUSIONS in frogbot-config.yml. The default pattern is: .git;node_modules;target;venv;test
since the file you describe has the word 'test' in it and we have it as a regexp in our default pattern- this file is intentionally excluded.
If you want to avoid this exclusion you need to set your own exclude pattern (can be empty).
This suppose to fix you issue and Ill be happy to hear if it actually did. If not please feel free to leave another comment here

@eranturgeman
Copy link
Contributor

Hello @vinodhini-devops
Did the above answer helped resolving your issue? if so- can I close this ticket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants