Commit graph

2330 commits

Author SHA1 Message Date
Dylan Ayrey
68b5f461f3
Update README.md 2023-09-26 21:16:35 -07:00
Zachary Rice
f2d0f809a8
Update Adding_Detectors_external.md (#1822)
* Update Adding_Detectors_external.md

* Update Adding_Detectors_external.md

* Update Adding_Detectors_external.md

* Lil more
2023-09-26 17:18:58 -05:00
ahrav
bf47fd69bb
Github partial scan (#1804)
* Add ability for targetted partial scans of Github.

* update comment.

* add more tests.

* add additiional test.

* address comments.
2023-09-26 12:38:33 -07:00
joeleonjr
1e42dae734
added PR and Issue body scanning (#1816)
* added PR and Issue body scanning; adjusted CLI args to fit

* removed print statement from debugging

* removed exclude-commits; adjusted CLI flags

* minor changes to match main branch

* fixing logic

* updating README for --issues and --prs
2023-09-26 12:25:48 -04:00
Zachary Rice
44c8cfffd1
Update Adding_Detectors_external.md (#1817) 2023-09-26 08:23:07 -05:00
Shubham Hibare
b71ea27a69
Implement an installation script with CheckSum Validation (#1808)
* Add installation script

* Update README.md

* Change set -e to set -o errexit

* Remove non-required dir  existence test

* Switch && to ||
2023-09-25 12:48:23 -07:00
āh̳̕mͭͭͨͩ̐e̘ͬ́͋ͬ̊̓͂d
1715e7ad23
updating browserstack detector to use tri-state verification (#1785)
* updating browserstack detector to use tri-state verification

* cleaning up nested conditions
2023-09-25 15:34:13 -04:00
āh̳̕mͭͭͨͩ̐e̘ͬ́͋ͬ̊̓͂d
af1434e05a
updating microsoft teams webhook detector to use tri-state verification (#1792)
* updating microsoft teams webhook detector to use tri-state verification

* cleaning up nested conditions
2023-09-25 15:30:41 -04:00
āh̳̕mͭͭͨͩ̐e̘ͬ́͋ͬ̊̓͂d
ac18096da0
updating myfreshworks detector to use tri-state verification (#1779)
* updating secret regex to include underscores and updating tests to have secret and domain within 20char range of keyword

* updating myfreshworks detector to use tri-state verification
2023-09-25 13:27:23 -04:00
āh̳̕mͭͭͨͩ̐e̘ͬ́͋ͬ̊̓͂d
cc9f5739dd
update figma to use tri-state verification (#1814) 2023-09-25 13:26:18 -04:00
āh̳̕mͭͭͨͩ̐e̘ͬ́͋ͬ̊̓͂d
f4ddc8b39e
adding support for new version of figma token (#1813) 2023-09-22 18:13:49 -04:00
Zachary Rice
2d3bb7560d
Update README.md (#1811) 2023-09-22 16:51:14 -05:00
Zachary Rice
995eb64d38
examples folder (#1734)
* wip examples folder

* Rename examples.md to README.md
2023-09-22 15:26:20 -05:00
atkins
36aa1451bd
Update protos image to use correct go version (#1810)
* Update protos image to use correct go version

* Update image tag to match version

* use bullseye

* update proto image

---------

Co-authored-by: Dustin Decker <dustin@trufflesec.com>
2023-09-22 14:08:56 -06:00
ahrav
6affc903e1
add line to link for azure repos. (#1801) 2023-09-21 16:07:11 -07:00
Dustin Decker
5afc7a32ca
fix detector test action (#1805) 2023-09-21 15:16:00 -07:00
Dustin Decker
b66bd9544c
aggregate detector tests daily (#1800)
* aggregate detector tests daily

* add manual dispatch

* fix test
2023-09-21 10:32:40 -07:00
āh̳̕mͭͭͨͩ̐e̘ͬ́͋ͬ̊̓͂d
62b2195502
Adding new function SetProgressOngoing to be used when the source does not yet know how many items it is scanning and does not want to display a percentage complete. (#1802)
Co-Authored-By: @mcastorina
2023-09-21 13:26:10 -04:00
āh̳̕mͭͭͨͩ̐e̘ͬ́͋ͬ̊̓͂d
1a1b2ca51a
updating uri detector to use tri-state verification (#1791) 2023-09-21 11:20:40 -04:00
dependabot[bot]
590115bca4
Bump golang.org/x/oauth2 from 0.10.0 to 0.12.0 (#1799)
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.10.0 to 0.12.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.10.0...v0.12.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-20 19:49:12 -07:00
dependabot[bot]
9b01c3d71c
Bump github.com/go-ldap/ldap/v3 from 3.4.5 to 3.4.6 (#1796)
Bumps [github.com/go-ldap/ldap/v3](https://github.com/go-ldap/ldap) from 3.4.5 to 3.4.6.
- [Release notes](https://github.com/go-ldap/ldap/releases)
- [Commits](https://github.com/go-ldap/ldap/compare/v3.4.5...v3.4.6)

---
updated-dependencies:
- dependency-name: github.com/go-ldap/ldap/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-20 17:58:21 -07:00
dependabot[bot]
16f885b2fc
Bump github.com/charmbracelet/bubbletea from 0.24.1 to 0.24.2 (#1798)
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.24.1 to 0.24.2.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v0.24.1...v0.24.2)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbletea
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-20 17:22:52 -07:00
dependabot[bot]
7ac4be481c
Bump github.com/getsentry/sentry-go from 0.22.0 to 0.24.1 (#1797)
Bumps [github.com/getsentry/sentry-go](https://github.com/getsentry/sentry-go) from 0.22.0 to 0.24.1.
- [Release notes](https://github.com/getsentry/sentry-go/releases)
- [Changelog](https://github.com/getsentry/sentry-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-go/compare/v0.22.0...v0.24.1)

---
updated-dependencies:
- dependency-name: github.com/getsentry/sentry-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-20 17:21:43 -07:00
dependabot[bot]
f2a528e32b
Bump cloud.google.com/go/storage from 1.31.0 to 1.33.0 (#1795)
Bumps [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go) from 1.31.0 to 1.33.0.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-cloud-go/compare/pubsub/v1.31.0...pubsub/v1.33.0)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/storage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-20 17:20:27 -07:00
dependabot[bot]
b9ae7014b0
Bump github.com/mattn/go-isatty from 0.0.18 to 0.0.19 (#1794)
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.18 to 0.0.19.
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.18...v0.0.19)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-20 16:53:24 -07:00
Miccah
efa404942a
Add ability to dynamically scale concurrently running sources (#1790)
* Add ability to dynamically scale concurrently running sources

Refactor SourceManager to use a counting semaphore to allow for
dymanically changing limits. This complicated `Wait() error` which needs
to return the first error encountered. We previously got that for free
using `errgroup.Group`, however now we need to handle that ourselves.
`Wait()` needs to return an error for use in the engine to set the
correct exit code.

* Group third party imports together
2023-09-20 16:49:56 -07:00
ahrav
a8c89c59b9
[bug] - fix link line (#1793)
* fix link line.

* rename.
2023-09-20 14:46:00 -07:00
ahrav
47d5ddebf2
Ability to update line number in link (#1788)
* Add functionality to update a source's link in the metadata with the updated line number.

* update comment.

* add logic to engine.

* only update link for non empty links.

* add tests for bb.
2023-09-19 15:39:13 -07:00
Ankush Goel
63eaccd208
fixed rubygems detector (#1781)
Co-authored-by: dsingdev-rocketx <bughunter00@protonmail.com>
2023-09-19 06:59:30 -07:00
Ankush Goel
f9ea22f72b
Update sonarcloud.go (#1784) 2023-09-18 08:24:51 -07:00
ahrav
d2676618c0
[bug] - correclty handle nested archived directories (#1778) 2023-09-15 04:37:15 -07:00
ahrav
22876f8381
replace interface{} with any. (#1771) 2023-09-15 04:35:15 -07:00
Miccah
dbcb888063
Update Source interface to use SourceID and JobID types (#1774)
The previous implementation used int64 for both, which can be mixed up
easily. Using distinct types adds a layer of type safety checked by the
compiler.
2023-09-14 11:28:24 -07:00
Mike Vanbuskirk
bbc3be3b6c
migrate buildpulse to integration test suite (#1775) 2023-09-13 15:25:12 -05:00
Mike Vanbuskirk
b4329e0825
add buildpulse config to sources (#1764)
* add buildpulse config to sources

* remove tab indentation

* add correct repo ID

* wrap test command in gotestsum

* exclusion should be detectors

* fix exclusions to match community-test

* update tag to reflect comm. tests
2023-09-13 11:34:53 -05:00
Cody Rose
1155ee2736
Implement Gitlab source validation (#1765)
This PR implements validation of Gitlab source configuration.

I was hoping to be able to unify more of the implementation of Validate and Chunks, but there was more divergence than I expected. Specifically, Chunks handles a fair number of Gitlab errors that aren't configuration errors (e.g. "Gitlab returned a repo with an unparseable URL"). Accommodating these in the Validate code path felt wrong, and I wasn't able to create a common code path that could accommodate both Validate and Chunks without looking awful.
2023-09-13 11:51:12 -04:00
martinohmann
31d17c4f93
fix: add missing error check in archive handler (#1770)
Fixes #1769

The existing error check `errors.Is(err, archiver.ErrNoMatch) && depth >
0` only conditionally handled a specific error.

Any other error case was not short circuited and ended up causing a
nil-pointer dereference further down the method when `format.Name()` was
invoked.
2023-09-13 07:07:40 -07:00
Miccah
72b6a9ec6b
Add a SourceType constant to all source packages (#1768) 2023-09-12 17:23:25 -07:00
Miccah
be4d0bcb41
Refactor SourceManager to remove Enrollment (#1740)
* Refactor SourceManager to remove Enrollment

Initializing the Source will be the responsibility of the caller. The
SourceManager exposes a GetIDs method for getting a source and job ID.

* Update tests

* Update engine usage

* Update apiClient interface to have one GetIDs method

* Update SourceManager usage in engine
2023-09-12 16:58:38 -07:00
âh̳̕mͭͭͨͩ̐e̘ͬ́͋ͬ̊̓͂d
91340c1e00
updating sendbirdorganizationapi detector to use tri-state verification (#1763) 2023-09-12 10:48:11 -04:00
Mike Vanbuskirk
de540652cb
verbosity updates to s3 source (#1750) 2023-09-11 14:53:43 -05:00
ahrav
90a07f0352
[chore] - fix slackwebhook detector (#1761)
* fix slackwebhook detector.

* sort imports.

* add test for 400.
2023-09-11 12:48:40 -07:00
Dustin Decker
72b3fa31a3
Improve private key detector (#1760)
* Surface extra data and check private keys directly against gitlab and github

* fix encrpypted private key test

* implement feedback

* mod tidy

* fix change

* Set timeout for SSH connections
2023-09-11 12:05:27 -07:00
Zubair Khan
3f84a6700e
add tri state verification to slack (not slack webhook) (#1731)
* add client, add known false positive check

* fix idiosyncracies

* cleanup

* cleanup comment

* add unexpected error test case

---------

Co-authored-by: Dustin Decker <dustin@trufflesec.com>
2023-09-11 08:38:43 -07:00
ahrav
fdeccf06a0
cache dupes w/ different decoders (#1754)
* only cache dupes that have different decoders.

* add test.

* remove file.

* update comment.
2023-09-11 08:18:48 -07:00
ahrav
70cdff915b
add test for custom providers. (#1759) 2023-09-11 08:18:34 -07:00
Cody Rose
2c32b14df1
always close aws response body (#1758) 2023-09-11 10:42:14 -04:00
ahrav
e53a72abd2
[chore] - Sentry detector update (#1746)
* add test case for account deactivated.

* Handle empty case.
2023-09-11 07:26:09 -07:00
Cody Rose
62ce9bac8b
Retry AWS verification 403s (#1757)
This PR introduces retries on 403s in the AWS detector in attempt to work around erroneous SignatureDoesNotMatch errors. As part of the work, the detector has been refactored somewhat, resulting in two minor semantic changes:

Errors crafting the verification HTTP request no longer result in the candidate secret being discarded.
The known-words-based false positive check now runs (and potentially discards candidate secrets) even if verification is disabled. This unifies its behavior with the hash-based false positive check.
2023-09-08 15:32:53 -04:00
trufflesteeeve
e68ace5338
Always attempt to return a git link (#1756) 2023-09-08 15:17:29 -04:00