MCPcopy Index your code
hub / github.com/crashappsec/ocular

github.com/crashappsec/ocular @v0.3.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.3 ↗ · + Follow
574 symbols 1,572 edges 101 files 320 documented · 56%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<h1 align="center">
    <img alt="Ocular" src="https://github.com/crashappsec/ocular/raw/v0.3.3/github/assets/img/logo.png"></img>
</h1>




    Ocular extends Kubernetes to provide static scanning configuration that enables you to perform regular or ad-hoc security scans over static software assets.
    It provides a set of custom resource definitions that allow you to configure and run security or compliance scanning tools.

Documentation Site Artifact Hub Go Reference Go Report Card GitHub Release License: GPL v3

Overview

Ocular is a Kubernetes API extension that allows you to perform security scans on static software assets. It provides a set of custom resource definitions that allow you to configure and run security or compliance scanning tools over static software assets, such as git repositories, container images, or any static content that can be represented on a file system.

It is designed to allow for both regular scans on a scheduled basis or, ad-hoc security scans ran on demand. The system allows for the user to customize not only the scanning tools that are used, but also: - How scan targets are enumerated (e.g. git repositories, container images, etc.) - How those scan targets are downloaded into the scanning environment (e.g. git clone, container pull, etc.) - How the scanning tools are configured and run (e.g. custom command line arguments, environment variables, etc.) - Where the results are sent (e.g. to a database, to a file, to a cloud storage etc.)

Each of these components can be configured independently, allowing for a high degree of flexibility and customization. Each of the 4 components (enumeration, download, scanning, and results) can be customized via a container image that implements a specific interface, normally through environment variables, command line arguments and file mounts.

For more information on Ocular and how to use it, see the Ocular project site.

Getting started

Installation via Helm

See the installation guide on our documentation site for instructions on how to install Ocular via Helm.

Running locally

See DEVELOPMENT.md for instructions on how to run the application locally.

Contact

We are constantly learning about emerging use cases and are always interested in hearing about how you use Ocular. If you would like to talk, please get in touch.

Extension points exported contracts — how you extend this code

Clock (Interface)
nolint:staticcheck Clock knows how to get the current time. It can be used to fake out timing for testing. [1 implementers]
internal/controller/cronsearch_controller.go
Closer (Interface)
(no doc)
internal/utils/readers.go
CloserIgnore (Interface)
(no doc)
internal/utils/readers.go

Core symbols most depended-on inside this repo

Error
called by 114
internal/resources/references.go
Run
called by 54
test/utils/utils.go
ValidateCreate
called by 24
internal/webhook/v1beta1/search_webhook.go
Reconcile
called by 20
internal/controller/search_controller.go
ValidateUpdate
called by 20
internal/webhook/v1beta1/search_webhook.go
Now
called by 13
internal/controller/cronsearch_controller.go
refMatches
called by 10
internal/webhook/v1beta1/common.go
ParseSetParameters
called by 9
internal/validators/parameters.go

Shape

Method 289
Function 161
Struct 93
Interface 26
TypeAlias 5

Languages

Go100%

Modules by API surface

api/v1beta1/zz_generated.deepcopy.go118 symbols
internal/controller/pipeline_controller.go18 symbols
pkg/generated/clientset/typed/api/v1beta1/api_client.go16 symbols
pkg/generated/clientset/typed/api/v1beta1/uploader.go14 symbols
pkg/generated/clientset/typed/api/v1beta1/search.go14 symbols
pkg/generated/clientset/typed/api/v1beta1/profile.go14 symbols
pkg/generated/clientset/typed/api/v1beta1/pipeline.go14 symbols
pkg/generated/clientset/typed/api/v1beta1/downloader.go14 symbols
pkg/generated/clientset/typed/api/v1beta1/cronsearch.go14 symbols
pkg/generated/clientset/typed/api/v1beta1/crawler.go14 symbols
internal/controller/search_controller.go14 symbols
internal/controller/cronsearch_controller.go13 symbols

For agents

$ claude mcp add ocular \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact