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

Trusty score is 0 when Minder comments on PR #4944

Open
eleftherias opened this issue Nov 12, 2024 · 1 comment
Open

Trusty score is 0 when Minder comments on PR #4944

eleftherias opened this issue Nov 12, 2024 · 1 comment
Labels
bug Something isn't working P1 Fix Soon: High priority items that should be considered in the next Sprint planning cycle

Comments

@eleftherias
Copy link
Contributor

Describe the issue

When I have a profile that includes the Trusty ruletype
And I create a PR that adds a dependency
Then Minder comments on the PR stating that the Trusty score is 0

This can be seen in this PR comment eleftherias/demo-repo-python#25 (review)

Screenshot 2024-11-12 at 11 36 46

Note: This happens in both production and staging

Additional information
This is the YAML output when I run minder profile get:

profile:
    alert: "off"
    context:
        project: b73403a2-d409-43ea-b8f6-2b567a558a6d
    displayName: Dependencies Security
    id: 30726deb-e96c-4c4c-b92f-454660072611
    name: dependencies-github-profile
    pullRequest:
        - def:
            action: review
            ecosystem_config:
                - name: npm
                  package_repository:
                    url: https://registry.npmjs.org
                  vulnerability_database_endpoint: https://api.osv.dev/v1/query
                  vulnerability_database_type: osv
                - name: go
                  package_repository:
                    url: https://proxy.golang.org
                  sum_repository:
                    url: https://sum.golang.org
                  vulnerability_database_endpoint: https://api.osv.dev/v1/query
                  vulnerability_database_type: osv
                - name: pypi
                  package_repository:
                    url: https://pypi.org/pypi
                  vulnerability_database_endpoint: https://api.osv.dev/v1/query
                  vulnerability_database_type: osv
          name: Check pull requests for vulnerable dependencies
          type: stacklok/pr_vulnerability_check
        - def:
            action: summary
            ecosystem_config:
                - name: npm
                  score: 5
                - name: pypi
                  score: 5
          name: Check pull requests for dependencies with low Trusty Score
          type: stacklok/pr_trusty_check
    remediate: "off"
    repository:
        - def:
            apply_if_file: go.mod
            package_ecosystem: gomod
            schedule_interval: daily
          name: Dependabot configured for Go projects
          type: stacklok/dependabot_configured
        - def:
            apply_if_file: package.json
            package_ecosystem: npm
            schedule_interval: daily
          name: Dependabot configured for JavaScript projects
          type: stacklok/dependabot_configured
        - def:
            apply_if_file: requirements.txt
            package_ecosystem: pip
            schedule_interval: daily
          name: Dependabot configured for Python projects
          type: stacklok/dependabot_configured

To Reproduce

No response

What version are you using?

No response

@eleftherias eleftherias added bug Something isn't working P1 Fix Soon: High priority items that should be considered in the next Sprint planning cycle labels Nov 12, 2024
@blkt
Copy link
Contributor

blkt commented Nov 20, 2024

Trusty API v1 removed score from its payload, and depending on where it appears it's either null or 0.

$ curl https://api.trustypkg.dev/v1/report\?package_name\=requests\&package_type\=pypi | jq .summary
{
  "score": null,
  "description": {
    "trust-summary": 8.5,
    "from": "provenance",
    "activity_user": 9.4,
    "activity_repo": 9.4,
    "activity": 9.4,
    "typosquatting": 10.0,
    "provenance_type": "historical_provenance_match"
  },
  "updated_at": "2024-11-20T07:24:35.479848"
}

So this is not a bug in Minder, but we do have to revisit pr_trusty_check rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 Fix Soon: High priority items that should be considered in the next Sprint planning cycle
Projects
None yet
Development

No branches or pull requests

2 participants