-
-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: cleanup and test improvements
Co-authored-by: Henning Perl <[email protected]>
- Loading branch information
Showing
13 changed files
with
98 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ coverage.txt | |
dist/ | ||
**/*.sqlite | ||
**/*.sqlite-journal | ||
.vscode/ | ||
.vscode/ | ||
.fuzzer/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
SHELL=/bin/bash -o pipefail | ||
|
||
export PATH := .bin/gobin:.bin/brew/bin:.bin/brew/sbin:${PATH} | ||
export PWD := $(shell pwd) | ||
export PATH := ${PWD}/.bin/gobin:${PWD}/.bin/brew/bin:${PWD}/.bin/brew/sbin:${PATH} | ||
|
||
GO_DEPENDENCIES = golang.org/x/tools/cmd/goimports \ | ||
github.com/mattn/goveralls \ | ||
|
@@ -11,7 +11,9 @@ GO_DEPENDENCIES = golang.org/x/tools/cmd/goimports \ | |
google.golang.org/grpc/cmd/protoc-gen-go-grpc \ | ||
github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc \ | ||
github.com/josephburnett/jd \ | ||
github.com/mikefarah/yq/v4 | ||
github.com/mikefarah/yq/v4 \ | ||
golang.org/x/tools/cmd/stringer \ | ||
github.com/mdempsky/go114-fuzz-build | ||
|
||
BREW_DEPENDENCIES = [email protected] \ | ||
[email protected] \ | ||
|
@@ -132,6 +134,17 @@ test-docs-samples: tools/jd | |
&& \ | ||
npm test | ||
|
||
.PHONY: fuzz-test | ||
fuzz-test: | ||
go test -tags=sqlite -fuzz=FuzzParser -fuzztime=10s ./internal/schema | ||
|
||
.PHONY: libfuzzer-fuzz-test | ||
libfuzzer-fuzz-test: .bin/go114-fuzz-build | ||
mkdir -p .fuzzer | ||
.bin/go114-fuzz-build -o ./.fuzzer/parser.a ./internal/schema | ||
clang -fsanitize=fuzzer ./.fuzzer/parser.a -o ./.fuzzer/parser | ||
./.fuzzer/parser -timeout=1 -max_total_time=10 -use_value_profile | ||
|
||
.PHONY: cve-scan | ||
cve-scan: docker tools/grype | ||
grype oryd/keto:latest | ||
|
@@ -141,3 +154,7 @@ post-release: tools/yq | |
cat docker-compose.yml | yq '.services.keto.image = "oryd/keto:'$$DOCKER_TAG'"' | sponge docker-compose.yml | ||
cat docker-compose-mysql.yml | yq '.services.keto-migrate.image = "oryd/keto:'$$DOCKER_TAG'"' | sponge docker-compose-mysql.yml | ||
cat docker-compose-postgres.yml | yq '.services.keto-migrate.image = "oryd/keto:'$$DOCKER_TAG'"' | sponge docker-compose-postgres.yml | ||
|
||
.PHONY: generate | ||
generate: tools/stringer | ||
go generate ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,18 +2,18 @@ | |
// | ||
// Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs. | ||
// | ||
// Schemes: http, https | ||
// Host: | ||
// BasePath: / | ||
// Version: Latest | ||
// License: Apache 2.0 https://github.com/ory/keto/blob/master/LICENSE | ||
// Contact: ORY <[email protected]> https://www.ory.sh | ||
// | ||
// Consumes: | ||
// - application/json | ||
// | ||
// Produces: | ||
// - application/json | ||
// Schemes: http, https | ||
// Host: | ||
// BasePath: / | ||
// Version: Latest | ||
// License: Apache 2.0 https://github.com/ory/keto/blob/master/LICENSE | ||
// Contact: ORY <[email protected]> https://www.ory.sh | ||
// | ||
// Consumes: | ||
// - application/json | ||
// | ||
// Produces: | ||
// - application/json | ||
// | ||
// swagger:meta | ||
package main | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
//go:generate .bin/swagger generate spec | ||
// Copyright © 2017 Aeneas Rekkas <[email protected]> | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
|