{"id":25506517,"url":"https://github.com/blackducksoftware/cerebros","last_synced_at":"2026-05-02T11:33:35.668Z","repository":{"id":40289916,"uuid":"236010767","full_name":"blackducksoftware/cerebros","owner":"blackducksoftware","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-25T01:46:37.000Z","size":3098,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-15T07:43:43.133Z","etag":null,"topics":["docker","golang","kubernetes","python","security","security-tools"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blackducksoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-24T13:48:00.000Z","updated_at":"2020-10-15T14:42:46.000Z","dependencies_parsed_at":"2024-06-21T10:45:51.182Z","dependency_job_id":"0cb84d49-72c4-4d9f-9437-77d76cc8d2b3","html_url":"https://github.com/blackducksoftware/cerebros","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/blackducksoftware/cerebros","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Fcerebros","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Fcerebros/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Fcerebros/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Fcerebros/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blackducksoftware","download_url":"https://codeload.github.com/blackducksoftware/cerebros/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blackducksoftware%2Fcerebros/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32533344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T11:28:32.350Z","status":"ssl_error","status_checked_at":"2026-05-02T11:27:30.140Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","golang","kubernetes","python","security","security-tools"],"created_at":"2025-02-19T06:58:15.556Z","updated_at":"2026-05-02T11:33:35.644Z","avatar_url":"https://github.com/blackducksoftware.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cerebros\n\n\n## Go\n\n```\ncd go\n```\n\n### Project structure\n\n`cmd/`: various executables, these shouldn't contain much code -- they're basically just entrypoints.  Each directory should have a `.go` file as the entrypoint, a `conf.json` as an example configuration file, and a `Dockerfile` to build an image.\n\n`pkg/`: where the vast majority of the code is!  Functions, classes, etc. goes here.\n\n`hack/deploy*`: scripts for deploying groups of containers on Kubernetes, including:\n - Blackduck image scanning\n - Polaris scanning\n - Polaris load generation, data seeding, scans, and prometheus metrics\n\n`Makefile`: helps you build and test everything.\n\n### Build an image\n\n```\nmake polaris-cli\n```\n\n### Test\n\n```\nmake vet\nmake test\n```\n\n### Format\n\n```\nmake fmt\n```\n\n### Metrics\n\nAdd prometheus metrics to everything!  It's very easy, check out [these metrics](https://github.com/blackducksoftware/cerebros/blob/master/go/pkg/kube/metrics.go) for an example:\n - figure out how to model your metrics -- do you want gauges, counters, or histograms?\n - instantiate your metrics objects *paying attention to labels* -- labels provided at instantiation have to match labels used at collection, otherwise prometheus will get upset\n - [write a unit test to verify that the metrics instantiate and can be used successfully](https://github.com/blackducksoftware/cerebros/blob/master/go/pkg/kube/metrics_test.go)\n - set up an http server and serve the prometheus metrics -- this allows the prometheus master to scrape your metrics\n    ```\n    // Prometheus and http setup\n    prometheus.Unregister(prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{}))\n    prometheus.Unregister(prometheus.NewGoCollector())\n\n    http.Handle(\"/metrics\", promhttp.Handler())\n\n    addr := fmt.Sprintf(\":%d\", config.Port)\n    go func() {\n        log.Infof(\"starting HTTP server on port %d\", config.Port)\n        http.ListenAndServe(addr, nil)\n    }()\n    ```\n \nTo collect metrics from your running container, you'll need to:\n - [run a prometheus master](https://github.com/blackducksoftware/cerebros/blob/474307bf0a2108a060cca93ed34a5a44288155aa/go/hack/deploy-polaris-load-generator/deploy.sh#L8)\n - [add metadata annotations to your pods](https://github.com/blackducksoftware/cerebros/blob/474307bf0a2108a060cca93ed34a5a44288155aa/go/hack/deploy-polaris-load-generator/polaris-cli.yaml#L16-L19)\n\n## Python\n\nTODO\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackducksoftware%2Fcerebros","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackducksoftware%2Fcerebros","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackducksoftware%2Fcerebros/lists"}