项目作者: alcideio

项目描述 :
Alcide Advisor GitHub Action
高级语言: Shell
项目地址: git://github.com/alcideio/advisor-action.git
创建时间: 2020-03-01T22:43:16Z
项目社区:https://github.com/alcideio/advisor-action

开源协议:Apache License 2.0

下载


Alcide Advisor Action

Alcide Advisor

A GitHub Action to add security scanning of your Kubernetes cluster as part of your pipeline workflow.
To customize the scan Create Alcide Advisor Account.

About Alcide Advisor

Alcide Advisor is an agentless service for Kubernetes audit and compliance that’s built to ensure a frictionless and secured DevSecOps workflow by layering a hygiene scan of Kubernetes cluster & workloads early in the development process and before moving to production. With Alcide Advisor, you can cover the following security checks:

  • Kubernetes infrastructure vulnerability scanning.
  • Hunting misplaced secrets, or excessive priviliges for secret access.
  • Workload hardening from Pod Security to network policies.
  • Istio security configuration and best practices.
  • Ingress Controllers for security best practices.
  • Kubernetes API server access privileges.
  • Kubernetes operators security best practices.
  • Deployment conformance to labeling, annotating, resource limits and much more …

Usage

Pre-requisites

Create a workflow YAML file in your .github/workflows directory. An example workflow is available below.
For more information, reference the GitHub Help Documentation for Creating a workflow file.

Inputs

For more information on inputs, see the API Documentation

  • include_namespaces: Namespaces to include in the scan - defaults to all
  • exclude_namespaces: Namespaces to exclude in the scan - defaults to kube-system,istio-system
  • output_file: Scan result file name. You can publish this artifact in a later step.
  • fail_on_critical: Fail the task if critical findings observed.
  • policy_profile:Alcide policy profile the cluster will be scanned against.
  • policy_profile_id: The profile id with which cluster should be scanned. Note - Alcide Api Key is required to run a scan with customized profile
  • alcide_apikey: Alcide API Key - to run advisor scan with customized profile an api-key is needed - login to your account to obtain one
  • alcide_apiserver: Alcide API Server - The api server provisioned to your account

Alcide Kubernetes Advisor

Example Workflow

Create a workflow (eg: .github/workflows/advisor-scan.yml):

  1. name: Alcide Advisor Workflow Example
  2. on:
  3. pull_request:
  4. push:
  5. branches:
  6. - '*'
  7. - '!master'
  8. jobs:
  9. advisor-test:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - name: Checkout
  13. uses: actions/checkout@v1
  14. - name: Launch Cluster
  15. uses: helm/kind-action@v1.0.0-alpha.3
  16. with:
  17. version: v0.7.0
  18. name: kruzer
  19. node_image: kindest/node:v1.16.4
  20. wait: 5m
  21. install_local_path_provisioner: true
  22. - name: Test
  23. run: |
  24. kubectl cluster-info
  25. kubectl get storageclass standard
  26. - name: Scan Local Cluster
  27. uses: alcideio/advisor-action@v1.1.0
  28. with:
  29. exclude_namespaces: '-'
  30. include_namespaces: '*'
  31. output_file: 'advisor-scan.html'
  32. - name: Upload Alcide Advisor Scan Report
  33. uses: actions/upload-artifact@v1
  34. with:
  35. name: advisor-scan.html
  36. path: advisor-scan.html

This uses @alcideio/advisor-action GitHub Action to security scan your Kubernetes cluster configuration.

Additional References

Code of conduct

Participation in the Helm community is governed by the Code of Conduct.