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

Add gRPC support #22

Merged
merged 4 commits into from
Jan 27, 2022
Merged

Add gRPC support #22

merged 4 commits into from
Jan 27, 2022

Conversation

noboruma
Copy link
Contributor

@noboruma noboruma commented Jan 6, 2022

Plugin-ize SecretScanner:

  • Add gRPC server (only enabled if the socket-path option is provided)
  • Add server tests
  • Adjust docker build
  • Add Makefile to automate gRPC schema code gen
  • Re-architect some code bits to fit better with the server architecture

Tests:
Used grpcurl to trigger image scan & local directory scans.
(See updated README for exact instructions)

noboruma and others added 2 commits January 6, 2022 10:59
- Add agent compatible gRPC communication
- Add gRPC server compatible with scope
- Adapt build steps in dockerfile
README.md Outdated
@@ -70,21 +72,43 @@ Install docker and run SecretScanner on a container image using the following in
docker run -it --rm --name=deepfence-secretscanner -v $(pwd):/home/deepfence/output -v /var/run/docker.sock:/var/run/docker.sock deepfenceio/secretscanning -local /home/deepfence/src/SecretScanner/test
```

* Or run SecretScanner as a gRPC server:
```
docker run -it --rm --name=deepfence-secretscanner -v $(pwd):/home/deepfence/output -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/sock:/tmp/sock deepfenceio -socket-path /tmp/sock/s.sock
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this command should change depending on the underlying docker sock. What will be the scenario when we use containerd ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PR #23 addresses the issue

@noboruma noboruma linked an issue Jan 11, 2022 that may be closed by this pull request
Replace docker calls with vessel
@ramanan-ravi ramanan-ravi merged commit a6d1ba7 into master Jan 27, 2022
@ramanan-ravi ramanan-ravi deleted the add-grpc branch January 27, 2022 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to serve API over gRPC
3 participants