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

Fix some GitHub source test issues #2774

Merged
merged 1 commit into from
May 24, 2024

Conversation

rgmz
Copy link
Contributor

@rgmz rgmz commented May 1, 2024

Description:

The test-detectors workflow is failing due to numerous issues. This fixes a few of them.

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

@rgmz rgmz requested a review from a team as a code owner May 1, 2024 17:48
pkg/sources/github/github.go Outdated Show resolved Hide resolved
assert.True(t, ok)
assert.False(t, gock.HasUnmatchedRequest())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add explicit failures if gock has unmatched requests. Otherwise, this will be logged but not fail the test which IMO isn't correct.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, agreed. Thanks for catching this.

Copy link
Contributor Author

@rgmz rgmz May 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already paying off. It caught an (inconsequential) issue introduced by #2814.

(This gets called twice.)
https://github.com/rgmz/trufflehog/blob/5102e3ae1178e320e749ca14ac94b4073165c975/pkg/sources/github/github.go#L620-L622

@rgmz rgmz force-pushed the test/github_errors branch 4 times, most recently from 198ca3a to 66a80a2 Compare May 22, 2024 20:02
@rgmz
Copy link
Contributor Author

rgmz commented May 24, 2024

Fixed the merge conflict.

Copy link
Collaborator

@ahrav ahrav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing these.

assert.True(t, ok)
assert.False(t, gock.HasUnmatchedRequest())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, agreed. Thanks for catching this.

@ahrav ahrav merged commit 5102e3a into trufflesecurity:main May 24, 2024
11 of 12 checks passed
@rgmz rgmz deleted the test/github_errors branch May 24, 2024 20:09
itsacoyote pushed a commit to matter-labs/docs-nuxt-template that referenced this pull request May 29, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[trufflesecurity/trufflehog](https://togithub.com/trufflesecurity/trufflehog)
| action | minor | `v3.76.3` -> `v3.77.0` |

---

### Release Notes

<details>
<summary>trufflesecurity/trufflehog
(trufflesecurity/trufflehog)</summary>

###
[`v3.77.0`](https://togithub.com/trufflesecurity/trufflehog/releases/tag/v3.77.0)

[Compare
Source](https://togithub.com/trufflesecurity/trufflehog/compare/v3.76.3...v3.77.0)

#### What's Changed

- Remove "finished verificationOverlap chunks" log line by
[@&#8203;rgmz](https://togithub.com/rgmz) in
[trufflesecurity/trufflehog#2860
- fix(deps): update module github.com/wasilibs/go-re2 to v1.5.3 by
[@&#8203;renovate](https://togithub.com/renovate) in
[trufflesecurity/trufflehog#2861
- fix(deps): update module google.golang.org/api to v0.181.0 by
[@&#8203;renovate](https://togithub.com/renovate) in
[trufflesecurity/trufflehog#2857
- fix(deps): update module github.com/aws/aws-sdk-go to v1.53.5 by
[@&#8203;renovate](https://togithub.com/renovate) in
[trufflesecurity/trufflehog#2859
- Update azure storage extra data by
[@&#8203;abmussani](https://togithub.com/abmussani) in
[trufflesecurity/trufflehog#2808
- Update regex for Organization in Azure Devops detector by
[@&#8203;abmussani](https://togithub.com/abmussani) in
[trufflesecurity/trufflehog#2866
- fix(deps): update module github.com/aws/aws-sdk-go to v1.53.6 by
[@&#8203;renovate](https://togithub.com/renovate) in
[trufflesecurity/trufflehog#2867
- \[chore] - Use http.NewRequestWithContext by
[@&#8203;ahrav](https://togithub.com/ahrav) in
[trufflesecurity/trufflehog#2870
- adding Groq detector by [@&#8203;0x1](https://togithub.com/0x1) in
[trufflesecurity/trufflehog#2873
- Log reasons for GitLab repo exclusion by
[@&#8203;rosecodym](https://togithub.com/rosecodym) in
[trufflesecurity/trufflehog#2875
- \[github] Scan user repositories by
[@&#8203;rgmz](https://togithub.com/rgmz) in
[trufflesecurity/trufflehog#2814
- Elastic adapter by [@&#8203;camgunz](https://togithub.com/camgunz) in
[trufflesecurity/trufflehog#2727
- Improve handling of Gist URLs by
[@&#8203;rgmz](https://togithub.com/rgmz) in
[trufflesecurity/trufflehog#2653
- Fix some GitHub source test issues by
[@&#8203;rgmz](https://togithub.com/rgmz) in
[trufflesecurity/trufflehog#2774
- fix(deps): update module github.com/aws/aws-sdk-go to v1.53.10 by
[@&#8203;renovate](https://togithub.com/renovate) in
[trufflesecurity/trufflehog#2871
- fix(deps): update module github.com/go-logr/logr to v1.4.2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[trufflesecurity/trufflehog#2869
- fix(deps): update module cloud.google.com/go/secretmanager to v1.13.1
by [@&#8203;renovate](https://togithub.com/renovate) in
[trufflesecurity/trufflehog#2884
- fix(deps): update golang.org/x/exp digest to
[`4c93da0`](https://togithub.com/trufflesecurity/trufflehog/commit/4c93da0)
by [@&#8203;renovate](https://togithub.com/renovate) in
[trufflesecurity/trufflehog#2883
- fix(deps): update module github.com/elastic/go-elasticsearch/v8 to
v8.13.1 by [@&#8203;renovate](https://togithub.com/renovate) in
[trufflesecurity/trufflehog#2886
- fix(deps): update module github.com/gabriel-vasile/mimetype to v1.4.4
by [@&#8203;renovate](https://togithub.com/renovate) in
[trufflesecurity/trufflehog#2890
- Added extra data for LaunchDarkly by
[@&#8203;abmussani](https://togithub.com/abmussani) in
[trufflesecurity/trufflehog#2836
- feat: support docker image history scanning by
[@&#8203;jamestelfer](https://togithub.com/jamestelfer) in
[trufflesecurity/trufflehog#2882

#### New Contributors

- [@&#8203;camgunz](https://togithub.com/camgunz) made their first
contribution in
[trufflesecurity/trufflehog#2727
- [@&#8203;jamestelfer](https://togithub.com/jamestelfer) made their
first contribution in
[trufflesecurity/trufflehog#2882

**Full Changelog**:
trufflesecurity/trufflehog@v3.76.3...v3.77.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/matter-labs/docs-nuxt-template).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants