{"id":18673018,"url":"https://github.com/projectsyn/lieutenant-api","last_synced_at":"2025-10-27T16:09:21.981Z","repository":{"id":39620042,"uuid":"228386536","full_name":"projectsyn/lieutenant-api","owner":"projectsyn","description":"The Project Syn Kubernetes Cluster and Tenants Inventory API","archived":false,"fork":false,"pushed_at":"2025-10-07T20:25:42.000Z","size":1028,"stargazers_count":9,"open_issues_count":17,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-10-07T22:25:25.605Z","etag":null,"topics":["api","gitops","inventory","kubernetes","openapi","projectsyn","rest"],"latest_commit_sha":null,"homepage":"https://docs.syn.tools/lieutenant-api/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/projectsyn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-12-16T12:51:00.000Z","updated_at":"2024-08-02T10:10:38.000Z","dependencies_parsed_at":"2025-04-12T01:51:29.784Z","dependency_job_id":"d8fe61e8-ebd6-404a-9d39-5c14e023e0f0","html_url":"https://github.com/projectsyn/lieutenant-api","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/projectsyn/lieutenant-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsyn%2Flieutenant-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsyn%2Flieutenant-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsyn%2Flieutenant-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsyn%2Flieutenant-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projectsyn","download_url":"https://codeload.github.com/projectsyn/lieutenant-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectsyn%2Flieutenant-api/sbom","scorecard":{"id":746689,"data":{"date":"2025-08-11","repo":{"name":"github.com/projectsyn/lieutenant-api","commit":"7254d6b756f02098c0d4cd77fcc68664ca74326f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":5,"reason":"Found 4/7 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/projectsyn/lieutenant-api/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/projectsyn/lieutenant-api/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/projectsyn/lieutenant-api/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/projectsyn/lieutenant-api/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/projectsyn/lieutenant-api/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/projectsyn/lieutenant-api/test.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:3","Warn: containerImage not pinned by hash: Dockerfile:16: pin your Docker image by updating gcr.io/distroless/static:nonroot to gcr.io/distroless/static:nonroot@sha256:cdf4daaf154e3e27cfffc799c16f343a384228f38646928a1513d925f473cb46","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yml:10"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3533 / GHSA-wq9g-9vfc-cfq9","Warn: Project is vulnerable to: GO-2024-3314 / GHSA-c2xf-9v2r-r2rx","Warn: Project is vulnerable to: GO-2025-3553 / GHSA-mh63-6h87-95cp","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2025-3488 / GHSA-6v2p-p543-phr9"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T18:58:59.453Z","repository_id":39620042,"created_at":"2025-08-22T18:58:59.454Z","updated_at":"2025-08-22T18:58:59.454Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281296516,"owners_count":26476933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api","gitops","inventory","kubernetes","openapi","projectsyn","rest"],"created_at":"2024-11-07T09:13:44.303Z","updated_at":"2025-10-27T16:09:21.966Z","avatar_url":"https://github.com/projectsyn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Syn: Lieutenant API\n\nRest API to provide services like inventory, cluster registry, tenant management and\nGitOps helper.\n\n**Please note that this project is in it's early stages and under active development**.\n\nThis repository is part of Project Syn.\nFor documentation on Project Syn and this component, see https://syn.tools.\n\n## Documentation\n\nDocumentation for this component is written using [Asciidoc][asciidoc] and [Antora][antora].\nIt is located in the [docs/](docs) folder.\nThe [Divio documentation structure](https://documentation.divio.com/) is used to organize its content.\n\nYou can preview the documentation using the `make antora` command, and then opening a browser to http://localhost:2020.\n\n## OpenAPI Spec\n\nThe API is specified in [OpenAPI 3](https://swagger.io/docs/specification/about/) format.\nIt's available in the file [openapi.yaml](openapi.yaml) in the root folder of this project.\n\n## Run API locally\n\nTo run the API on your local workstation, follow these steps:\n\n```\nexport KUBECONFIG=~/.kube/myconfig\nexport NAMESPACE=syn-lieutenant\nmake run\n```\n\nThe `kubeconfig` must grant access to the cluster.\n\nCheck with `curl localhost:8080/healthz` if the API is responding.\n\n## Example queries\n\nDone with [HTTPie](https://httpie.org/), but also works with plain `curl`.\n\n_Create Tenant_\n```\nhttp localhost:8080/tenants Authorization:\"Bearer $(kubectl get secrets test-token-zzzzz -o json | jq \".data.token\" -r | base64 --decode)\" displayName=\"Syn Corp\"\n```\n\n_Query Tenants_\n\n```\nhttp localhost:8080/tenants Authorization:\"Bearer $(kubectl get secrets test-token-zzzzz -o json | jq \".data.token\" -r | base64 --decode)\"\n```\n\n* `test-token-zzzzz` is the token of a ServiceAccount with all the needed RBAC\n  rights on the underlying Kubernetes cluster\n\n## Development\n\n### API Versioning\n\nThere is no API versioning exposed. Internally the \"API Evolution\" approach is\nused which is described in this excellent blog post:\n[API Versioning Has No \"Right Way\"](https://apisyouwonthate.com/blog/api-versioning-has-no-right-way).\n\n### API Mocking\n\nTo test the API before writing actual code, API mocking can be used. One cool tool\nto do that is [Prism](https://github.com/stoplightio/prism). Example:\n\n```\ndocker run --init --rm -p 4010:4010 -v $(pwd):/tmp stoplight/prism:3 mock -h 0.0.0.0 \"/tmp/openapi.yaml\"\n\ncurl http://localhost:4010/tenants\n```\n\n### Code Generation\n\nAs the API spec is written with OpenAPI, the [OpenAPI Generator](https://openapi-generator.tech/) is used to generate the Go boilerplate code.\n\n### Object Name Generation\n\nSome API endpoints store data in Kubernetes objects. These objects must be\nnamed like this:\n\n`pwgen -A -B 6 1`\n\n### Links\n\nSome good links which help with OpenAPI development:\n\n* [OpenAPI.Tools](https://openapi.tools/)\n* [OpenAPI (Swagger) Editor](https://marketplace.visualstudio.com/items?itemName=42Crunch.vscode-openapi) (Visual Studio Code Extension)\n* [OpenAPI Preview](https://marketplace.visualstudio.com/items?itemName=zoellner.openapi-preview) (Visual Studio Code Extension)\n\n\n## Contributing and license\n\nThis library is licensed under [BSD-3-Clause](LICENSE).\nFor information about how to contribute see [CONTRIBUTING](CONTRIBUTING.md).\n\n[commodore]: https://docs.syn.tools/commodore/index.html\n[asciidoc]: https://asciidoctor.org/\n[antora]: https://antora.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectsyn%2Flieutenant-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojectsyn%2Flieutenant-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectsyn%2Flieutenant-api/lists"}