reviewdog
kube-score
Our great sponsors
reviewdog | kube-score | |
---|---|---|
12 | 8 | |
7,366 | 2,577 | |
2.8% | - | |
9.5 | 8.0 | |
2 days ago | 9 days ago | |
Go | Go | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
reviewdog
-
Code reviews and Suggestions from SARIF report
I build a general converter from SARIF to Reviewdog Diagnostic Format (RDFormat), then use Reviewdog to give suggested code changes as well as the context of the changes for PR reviewing.
-
My CNCF LFX Mentorship Spring 2023 Project at Kubescape
I helped improve the Kubescape GitHub Actions fix suggestions code review process, where I created the workflow which works by collecting the SARIF (Static Analysis Results Interchange Format) file that kubescape generates. Then, with the help of HollowMan6/sarif4reviewdog, convert the SARIF file into RDFormat (Reviewdog Diagnostic Format) and generate reviews for code fix suggestions on GitHub Actions using Reviewdog. I also helped add the “fix" object support for the Kubescape-generated SARIF report.
- Reviewdog: Code analysis regardless of programming language
-
Goast: Generic static analysis for Go Abstract Syntax Tree by OPA/Rego
Static analysis should be performed continuously by CI (Continuous Integration) to prevent unintentional inclusion of code. The JSON output schema is compatible with reviewdog and can be used as is in reviewdog.
-
reviewdog-gitlab-webhook: Trigger reviewdog checks for GitLab repo using webhooks
Trigger reviewdog checks on a repository via GitLab webhook rather than CI job.
-
How to reuse steps in Tekton tasks
# parameters - op: add path: /spec/params/- value: name: report-file default: reportfile description: Report file with errors - op: add path: /spec/params/- value: name: format default: golint description: Format of error input from the task - op: add path: /spec/params/- value: name: reporter default: local description: Reporter type for reviewdog https://github.com/reviewdog/reviewdog#reporters - op: add path: /spec/params/- value: name: diff default: git diff FETCH_HEAD description: Diff command https://github.com/reviewdog/reviewdog#reporters # workspaces - op: add path: /spec/workspaces/- value: name: token description: | Workspace which contains a token file for Github Pull Request comments. Must have a token file with the Github API access token # steps - op: add path: /spec/steps/- value: name: reviewdog-report image: golangci/golangci-lint:v1.31-alpine # both have the same workspace name workingDir: $(workspaces.source.path) script: | #!/bin/sh set -ue wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b $(go env GOPATH)/bin export REVIEWDOG_GITHUB_API_TOKEN=$(cat $(workspaces.token.path)/token) cat $(params.reportfile) | reviewdog -f=$(params.format) -diff="$(params.diff)"
-
I manage my dev.to blog in GitHub repository
In reference article, use prettier to format the markdown and the code snippets. I implement a text review using textlint and reviewdog in addition to that.
-
Automated code review for on-prem
JetBrains Qodana is one option, but currently requires glue code to map the findings to MR comments. I'm using reviewdog for it but I'm hoping they'll eventually fix it to have native integration
-
GitHub Action to annotate tsc errors;
I'm trying to make a GitHub action which automatically runs tsc to find TypeScript errors. Those errors should be annotated inline in the PR/Commits. I found reviewdog, which should work perfectly for this - but I played around with that for about 4 hours now and can't seem to get it to report errors successfully. tsc exits with code 2, but reviewdog still says that everything went fine. So I'm trying to find another solution for this, has anyone here done this before? For comparison, I managed to do the same thing with ESLint by adding a custom formatter to the eslint command (-f param), which then gets automatically picked up by the GitHub action - but I can't find something similar for tsc..
-
Incident with GitHub Actions, Issues, Pull Requests, and Webhooks
I used ReviewDog to wire in Qodana results, so I hear you about wishing it was built in, but it is achievable: https://github.com/reviewdog/reviewdog#reporter-gitlab-merge...
Based on my contact with GitLab's built-in other scanning tools, I wouldn't trust their vuln management further than I could throw it, so you're likely not missing much on that front
kube-score
- GitHub - zegl/kube-score: Kubernetes object analysis with recommendations for improved reliability and security
-
What should readiness & liveness probe actually check for?
This is taken from: https://github.com/zegl/kube-score/blob/master/README_PROBES.md and I have read the same opinions elsewhere.
-
How do you take care of your manifests?
A developer's workflow should anyway deploy to a real, or close-to-production Kubernetes cluster before opening a merge request with the finished change. That means the developer definitely sees upfront if the manifest is super wrong. Tools like kube-score (which is quite opinionated), kubeval or OPA rules can help in addition to keep things consistent and secure. For such a developer workflow, I recommend Skaffold since it mostly just wraps Docker, kubectl and the templating tool you're using (e.g. kustomize/helm).
- Kube-Score v1.14
- kube-score v1.14 – Kubernetes object analysis with recommendations for improved reliability and security
-
Securing Kubernetes Deployments
apps/v1/Deployment semaphore-demo-ruby-kubernetes 💥 [CRITICAL] Container Resources · semaphore-demo-ruby-kubernetes -> CPU limit is not set Resource limits are recommended to avoid resource DDOS. Set resources.limits.cpu · semaphore-demo-ruby-kubernetes -> Memory limit is not set Resource limits are recommended to avoid resource DDOS. Set resources.limits.memory · semaphore-demo-ruby-kubernetes -> CPU request is not set Resource requests are recommended to make sure that the application can start and run without crashing. Set resources.requests.cpu · semaphore-demo-ruby-kubernetes -> Memory request is not set Resource requests are recommended to make sure that the application can start and run without crashing. Set resources.requests.memory [CRITICAL] Container Image Pull Policy · semaphore-demo-ruby-kubernetes -> ImagePullPolicy is not set to Always It's recommended to always set the ImagePullPolicy to Always, to make sure that the imagePullSecrets are always correct, and to always get the image you want. [CRITICAL] Pod NetworkPolicy · The pod does not have a matching NetworkPolicy Create a NetworkPolicy that targets this pod to control who/what can communicate with this pod. Note, this feature needs to be supported by the CNI implementation used in the Kubernetes cluster to have an effect. [CRITICAL] Pod Probes · Container is missing a readinessProbe A readinessProbe should be used to indicate when the service is ready to receive traffic. Without it, the Pod is risking to receive traffic before it has booted. It's also used during rollouts, and can prevent downtime if a new version of the application is failing. More information: https://github.com/zegl/kube-score/blob/master/README_PROBES.md [CRITICAL] Container Security Context · semaphore-demo-ruby-kubernetes -> Container has no configured security context Set securityContext to run the container in a more secure context. v1/Service semaphore-demo-ruby-kubernetes-lb ✅
-
Top 20 useful k8s tools
Link : https://github.com/zegl/kube-score
What are some alternatives?
Qodana - 📝 Source repository of Qodana Help
polaris - Validation of best practices in your Kubernetes clusters
prettier - Prettier is an opinionated code formatter.
popeye - 👀 A Kubernetes cluster resource sanitizer
datree - Prevent Kubernetes misconfigurations from reaching production (again 😤 )! From code to cloud, Datree provides an E2E policy enforcement solution to run automatic checks for rule violations. See our docs: https://hub.datree.io
kubeconform - A FAST Kubernetes manifests validator, with support for Custom Resources!
ls-lint - An extremely fast directory and filename linter - Bring some structure to your project filesystem
editorconfig-vim - EditorConfig plugin for Vim
kubeval - Validate your Kubernetes configuration files, supports multiple Kubernetes versions
microplane - A CLI tool to make git changes across many repos, especially useful with Microservices.
polaris - Shopify’s design system to help us work together to build a great experience for all of our merchants.