Commit Graph
8 Commits
Author SHA1 Message Date
Muneeb Ullah Khan f70218bad0 [INS-249] Updated Gitlab client from v0.129.0 to v1.12.0(latest) (#4655)
* updated gitlab client from v0.129.0 to v1.12.0(latest)

* fixed integration test

* unpinned v0.129 gitlab client and migrated code

* Migrated auth code

* Remove unused 'time' import

Removed unused 'time' import from gitlab.go

* reverted merged case statements

* splitted line like before

* splitted code into multiple lines

* resolved bugbot comments
2026-02-03 16:52:13 +05:00
Kashif Khan fc3f35cedd Gitlab Source: Backoff from Scan2 which is experimental to legacy pagination API call (#4608)
* Backoff from Scan2 which is experimental to legacy pagination API call

This commit rewrite simplifiedGitlabEnumeration to use legacy pagination API call with keyset pagination instead of Scan2 which is currently in experimental state. Note
that this doesn't promise to fix this problem it's just a test to check. It also adds a retry logic in case any 500 error occurs. I added some logs as well to keep track
of no of projects being enumerated.

* implemented builtin retry mechanism for gitlab and proper handling of next page

* fixed basic auth

* Some enhancements

Reversed the gitlab cloud logic to add membership flag, so that we use the default false for non gitlab.com instances.
This can help if the issue really was membership flag as mentioned in some gitlab issues.
Also added simple flag in list projects to get only minimal fields in response instead of big json response for each project.

Added test case as well.

* enhance the test case
2026-01-14 09:58:21 +05:00
Mustansir a633174c3b [INS-206] Store Gitlab Project ID in secret location metadata (#4601)
* add wrapper reporter to append project details to chunk metadata

* use cache to store project details

* revert unnecessary change

* delete from cache when done with scanning in ChunkUnit, implement PR suggestions

* query project details using repo instead of having it in source unit

* revert removal of build tag

* Incorporated PR comments
2025-12-22 10:45:42 +05:00
Cody Rose 1d87fba935 Apply configured include/ignore lists to GitLab unit scans (#4592)
Previously, the GitLab include and ignore lists were only applied during repository enumeration, which meant that they would be ignored after enumeration completed. For large environments, post-enumeration scanning can take days, and it was awkward that the include/ignore lists could effectively not be modified during that time. This PR changes things such that repositories can be configured to be skipped even post-enumeration.

Importantly, repositories cannot be "un-ignored" post-enumeration. This is unfortunate, but this PR still represents improvement on the status quo.
2025-12-09 09:50:33 -05:00
Shahzad Haider a95f8bc878 Scan GitLab Groups (#4320)
* gitlab groups init

* added list group projects api

* list group projects updated

* added duplicate repo scan check

* comments addressed

* added error when repo and group id flags are provided at the same time

* added test case for gitlab group projects
2025-07-29 15:14:31 +05:00
Kashif Khan 7792f0263e Added KeySet Pagination for Gitlab Projects V2 Enumeration (#4319)
* Added keyset pagination for Gitlab Projects V2 Enumeration

* fallback to safe version

* resolved comments

* pinned gitlab-client-go to v0.129.0

* pinned gitlab-client-go to v0.129.0
2025-07-17 10:57:37 +05:00
Abdul Basit f4670aaab1 [feat] Gitlab inclusion globbing (#3500)
* Implemented gitlab inclusion globbing.
Included test.

* implemented two new flags for gitlab scan, includeRepo and excludeRepo to support globbing.
Apply globbing filter when repos is not provided.

* implemented integration test for inclusion globbing
remove test to check errors if globs are invalid.

* made changes to support glob compile errors.
modified changes to support glob compilation errors.

* removed unused context from few functions.
2024-10-30 18:23:34 +05:00
ahrav 9ef5151200 Gitlab scan targets (#2470)
* add method to scan targets

* Add logic to handle targetted scan

* address comments

* remove pagination opts

* add kvp with scan type
2024-02-23 07:40:52 -08:00