Commit Graph

48 Commits

Author SHA1 Message Date
laurentsimon
6f203e73b6
[migration to score] 4: active, fuzzing and code-review (#721)
* details-1

* nits

* typo

* commments

* dependabot and binary artifacts checks

* typo

* linter

* missing errors.go

* linter

* merge fix

* active, fuzzing and code review checks

* e2e tests for fuzzing

* fixes
2021-07-21 09:40:40 -07:00
laurentsimon
ab4bb60c9c
[migration to score] 1: create errors and new functions (#712)
* details-1

* comment

* doc

* nits

* typo

* commments

* nit

* linter
2021-07-20 11:36:35 -07:00
laurentsimon
45ea97e502
Add more github token names for env variable (#694)
* draft

* commit 1

* dead code

* comments

* merge fix

* typo
2021-07-19 18:56:42 +00:00
Anton
d08874e4c5
🐛 Updated checks arguments to be case insensitive (#685)
* Updated checks to be case insensitive

* Removed the need to have check indexes/keys lowercase

* Refactored to use strings.EqualFold()

* Refactored enabling checks into a separate function

* Refactored enableCheck() to return a bool
2021-07-14 09:26:33 -04:00
Anton Ritter-Gogerly
0967915691 Added error for invalid checks 2021-07-13 08:18:43 -05:00
Azeem Shaikh
7cf56e04af
Log error if GITHUB_AUTH_TOKEN is unset (#680)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-07-12 13:59:44 -07:00
Azeem Shaikh
d81fd24246
Add ListFiles and GetFileContent APIs (#637)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-06-30 23:49:49 -07:00
Azeem Shaikh
7861478e1a
Add error handling to RunScorecard fn (#595)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-06-20 23:31:10 -07:00
Azeem Shaikh
0b62c58704
Add v0 of RepoClient interface (#587)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-06-17 13:21:32 -07:00
Chris McGehee
524a187b31 Add new linter: errorlint 2021-05-30 13:12:42 -04:00
Chris McGehee
6b63f3f963
🌱 Fix lint issues: Replace golint with revive (#493)
* Fix lint issues: Replace golint with revive
golint is deprecated and recommended to be replaced with revive

* Updating comments to be more accurate

* Updating comments again

Co-authored-by: Azeem Shaikh <azeemshaikh38@gmail.com>
2021-05-24 11:34:33 -07:00
Chris McGehee
61ecad3151
Add new linter: gci (#498) 2021-05-23 20:51:52 -07:00
Chris McGehee
50f7ed8519
🌱Fix lint issues: gochecknoinits linter (#485)
* Fix lint issues: gochecknoinits linter

* Fix lint issues: gochecknoinits linter
2021-05-22 13:19:52 -04:00
Azeem Shaikh
37519d9672
Update RunScorecards API. (#461)
Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-05-16 19:38:46 -07:00
Chris McGehee
82be54ba75
🌱 Fix lint issues: goerr113 linter (#398)
* Fix lint issues: goerr113 linter
This linter encourages wrapped static errors instead of dynamic errors.

* Updating capitalization
2021-05-06 15:32:27 -05:00
Chris McGehee
6a7142fe21 Fix lint issues: golint linter 2021-05-02 14:49:40 -05:00
Chris McGehee
526d9b5444 Fix lint issues: ineffassign linter 2021-05-02 11:45:40 -05:00
Azeem Shaikh
86a46560c8 Rename CheckResults to Checks to match BQ schema. 2021-04-26 17:45:04 -05:00
Azeem Shaikh
bd3eff1fcf
Cron job uses line-delimited JSON (#344)
*  Refactor to reduce code duplication

* 

* Move lib/ back to checker/

* Move lib/ back to checker/

* Move lib/ back to checker/

* Address PR comments.

* Addressing PR comments.

* Separate out ReposURL nito repos/

* Add TODO in gitcache module.

* Add RepoRequest/Response types.

* Avoid printing `ShouldRetry` and `Error` in output JSON.

* Fix JSON output.

* Simplify cmd package.

* Make cron/ a package instead of module.

* Fix TODO.

* Remove binary file.

* go.mod file.

* go.mod updates.

* Refactor cron to use in-memory JSON.

* Fix JSON output.

* Fix go.mod

* Address PR comments.

* Change %w -> %v.

* Address PR comments.

* Fix err.

Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-04-19 12:49:51 -07:00
Chris McGehee
06993b72ce
🐛 Fix linting issues (1 of n) (#348)
* Fix lint issues: whitespace linter

* Fix lint issues: wrapcheck linter

* Fix lint issues: errcheck linter

* Fix lint issues: paralleltest linter

* Fix lint issues: gocritic linter
Most changes from this commit are from passing checker.CheckResult by reference and not by value. gocritic identified that as a huge parameter.
gocritic also prefers regexp.MustCompile over Compile when the pattern is a const
2021-04-19 12:18:34 -07:00
Azeem Shaikh
a58818d258
🌱 : Reduce code duplication for follow-up cron refactoring (#338)
*  Refactor to reduce code duplication

* 

* Move lib/ back to checker/

* Move lib/ back to checker/

* Move lib/ back to checker/

* Address PR comments.

* Addressing PR comments.

* Avoid printing `ShouldRetry` and `Error` in output JSON.

* Fix JSON output.

Co-authored-by: Azeem Shaikh <azeems@google.com>
2021-04-10 07:26:56 -05:00
Abhishek Arya
a44dd6a758
Add pypi and ruby gems package support. (#226)
Adds some more package managers to
https://github.com/ossf/scorecard/issues/33

Co-authored-by: Naveen <172697+naveensrinivasan@users.noreply.github.com>
2021-03-01 11:21:20 -05:00
naveen
7726ca7987 Feature - Include metadata in the results
Included metadata that can be passed an argument to the command line.
The same metadata will returned the `json` results.
2021-02-22 19:23:46 -05:00
Nathan
554ca76bfe Fix - golangci issues gomnd, goconst
Fixed the golangci issues for gomnd and goconst.
Added ginkgo dependency in the makefile.
2021-02-17 18:22:18 -05:00
naveen
7a713e5b43 Feature - Serve json response in http
If the "Content-Type"== "application/json" then serve json response
2021-02-16 11:26:09 -05:00
Naveen
c77e995ae5
Fix - output message for non default output (#167)
The json output had non-json output. Fixed it output only for default
output.
2021-02-12 18:13:54 -08:00
naveen
f385b0d9df Feature - run scans from npm pacakge name
Implemented scans from npm package name.
2021-02-02 16:07:41 -05:00
naveen
06f2616e7e fix - golangci-lint issues
Fixed the golangci-lint issues.
2020-12-22 16:20:10 -05:00
Abhishek Arya
09518b45b2 Add details field to --format=json 2020-11-23 19:00:57 -08:00
Dan Lorenc
71dace54e3 Fix date formatting. 2020-11-16 13:42:10 -06:00
dlorenc
62ae708944
Add a JSON format mode. (#65)
This is usable as is, but is also desigend to be easy to import into a database.
2020-11-12 12:47:08 -06:00
Abhishek Arya
079180d0ae Bug fixes
- Fix typo for default output function.
- For signed tags, get the only required last 5. matches signed
releases.
2020-11-09 18:13:59 -08:00
Dan Lorenc
268aea59d2 Add CSV formatting mode.
This allows the user to specify "--format=csv" to get the results output in CSV columns.
2020-11-09 18:23:30 -06:00
Dan Lorenc
9f686dc707 Rename repo/modules. 2020-10-27 14:23:48 -05:00
Abhishek Arya
81eab9d2d8
Add license header and code of conduct files. (#34)
* Add license header and code of conduct files.

* Fill missing field.
2020-10-26 15:22:13 -05:00
Abhishek Arya
3b2962da71
Fix descriptions 2020-10-25 10:48:13 -07:00
Dan Lorenc
55ba575d73 Hook up the --show-details flag, and cleanup the output. 2020-10-21 12:35:58 -05:00
Dan Lorenc
b16aa36bd8 WIP webserver. 2020-10-20 08:52:57 -05:00
Dan Lorenc
9606a9f228 Refactor check list handling. 2020-10-20 08:37:51 -05:00
Dan Lorenc
44e39f7a00 Results over a channel as well. 2020-10-19 19:32:18 -05:00
Dan Lorenc
6a621a7396 Move printing back to root.go. 2020-10-19 19:26:48 -05:00
Dan Lorenc
a2eb4f862d More refactors. 2020-10-19 19:14:51 -05:00
dlorenc
6627531e58
Separate logic from cmd/root.go (#29)
This will make it easier to add subcommands and to serve the scorecard over HTTP.
2020-10-19 19:07:30 -05:00
Abhishek Arya
cb0fd9e4e9 Fix 2020-10-19 08:15:01 -07:00
Abhishek Arya
3c4623184a Minor fixes. 2020-10-19 08:09:10 -07:00
dlorenc
1fa5208d2e
Improve repo flag validation. (#24) 2020-10-19 09:46:56 -05:00
Dan Lorenc
cadc2b74e7 Update text. 2020-10-19 09:05:22 -05:00
dlorenc
49fba38c8b
Use Cobra CLI library, reorganize a bit. (#22) 2020-10-18 18:49:51 -05:00