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

Gitlab group license discovery fails with 1.0.8 #310

Open
tvannahl opened this issue May 23, 2024 · 2 comments
Open

Gitlab group license discovery fails with 1.0.8 #310

tvannahl opened this issue May 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@tvannahl
Copy link

TL;DR

When executing legitify v1.0.8 against a premium repository the license discovery fails and findings are being skipped.

Expected behavior

All policies are being scanned with a premium Gitlab license

Observed behavior

Some policies are being skipped due to "unmet prerequisite".

Version

1.0.8

On which operating system are you using legitify?

Linux

Relevant log output

error.log:
2024/05/23 14:30:02 2024/05/23 14:30:02 failed to get namespace for group mygroup/batcave/personal-project didn't find namespace for mygroup

permissions_log.json:
{
  "missing_permissions": {},
  "skipped_policies": {
    "code_review_by_two_members_not_required": {
      "CI CD-Security": "Unmet prerequisite: premium"
    },
    "code_review_not_required": {
      "CI CD-Security": "Unmet prerequisite: premium"
    },
    "missing_default_branch_protection": {
      "CI CD-Security": "Unmet prerequisite: premium"
    },
    "missing_default_branch_protection_force_push": {
      "CI CD-Security": "Unmet prerequisite: premium"
    },
    "no_signed_commits": {
      "CI CD-Security": "Unmet prerequisite: premium"
    },
    "repository_allows_committer_approvals_policy": {
      "CI CD-Security": "Unmet prerequisite: premium"
    },
    "repository_allows_overriding_approvers": {
      "CI CD-Security": "Unmet prerequisite: premium"
    },
    "repository_dismiss_stale_reviews": {
      "CI CD-Security": "Unmet prerequisite: premium"
    },
    "repository_require_code_owner_reviews_policy": {
      "CI CD-Security": "Unmet prerequisite: premium"
    }
  }
}{
  "missing_permissions": {},
  "skipped_policies": {
    "code_review_by_two_members_not_required": {
      "CI CD-Security": "Unmet prerequisite: premium"
    },
    "code_review_not_required": {
      "CI CD-Security": "Unmet prerequisite: premium"
    },
    "missing_default_branch_protection": {
      "CI CD-Security": "Unmet prerequisite: premium"
    },
    "missing_default_branch_protection_force_push": {
      "CI CD-Security": "Unmet prerequisite: premium"
    },
    "no_signed_commits": {
      "CI CD-Security": "Unmet prerequisite: premium"
    },
    "repository_allows_committer_approvals_policy": {
      "CI CD-Security": "Unmet prerequisite: premium"
    },
    "repository_allows_overriding_approvers": {
      "CI CD-Security": "Unmet prerequisite: premium"
    },
    "repository_dismiss_stale_reviews": {
      "CI CD-Security": "Unmet prerequisite: premium"
    },
    "repository_require_code_owner_reviews_policy": {
      "CI CD-Security": "Unmet prerequisite: premium"
    }
  }
}

Additional information

Tested with v1.0.7. where everything works as expected. Tests executed in Fedora 39.

Additionally tested and verified on Macos.

@tvannahl tvannahl added the bug Something isn't working label May 23, 2024
@noamd-legit
Copy link
Contributor

Hi @tvannahl!
Could you share the command you used to run legitify?

@tvannahl
Copy link
Author

We're using legitify analyze --scm gitlab --repo {path} withSCM_TOKEN set and executed within a gitlab ci cd pipeline.

@Legit-Labs Legit-Labs deleted a comment from noamd-legit Jul 28, 2024
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