{"id":13647433,"url":"https://github.com/user-cont/colin","last_synced_at":"2025-04-04T22:03:46.683Z","repository":{"id":30239777,"uuid":"124359252","full_name":"user-cont/colin","owner":"user-cont","description":"Tool to check generic rules/best-practices for containers/images/dockerfiles.","archived":false,"fork":false,"pushed_at":"2025-02-17T21:22:52.000Z","size":6693,"stargazers_count":52,"open_issues_count":21,"forks_count":27,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-28T21:05:33.156Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/user-cont.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2018-03-08T08:15:35.000Z","updated_at":"2025-01-21T10:23:38.000Z","dependencies_parsed_at":"2023-02-16T15:15:32.146Z","dependency_job_id":"c51c2e89-e6b2-4599-b7f7-3ae23c83769b","html_url":"https://github.com/user-cont/colin","commit_stats":{"total_commits":509,"total_committers":18,"mean_commits":28.27777777777778,"dds":"0.46758349705304514","last_synced_commit":"68ab8e3a1a50c5d6562cb1fc1eb0e0f3a6ba0552"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/user-cont%2Fcolin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/user-cont%2Fcolin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/user-cont%2Fcolin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/user-cont%2Fcolin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/user-cont","download_url":"https://codeload.github.com/user-cont/colin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256105,"owners_count":20909240,"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","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":[],"created_at":"2024-08-02T01:03:33.539Z","updated_at":"2025-04-04T22:03:46.642Z","avatar_url":"https://github.com/user-cont.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Colin\n\n![PyPI](https://img.shields.io/pypi/v/colin.svg)\n![PyPI - License](https://img.shields.io/pypi/l/colin.svg)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/colin.svg)\n![PyPI - Status](https://img.shields.io/pypi/status/colin.svg)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/427eb0c5dfc040cea798b23575dba025)](https://www.codacy.com/app/user-cont/colin?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=user-cont/colin\u0026utm_campaign=Badge_Grade)\n[![Build Status](https://ci.centos.org/job/user-cont-colin-master/badge/icon)](https://ci.centos.org/job/user-cont-colin-master/)\n\nTool to check generic rules and best-practices for container images and dockerfiles.\n\nFor more information, please check our [documentation on colin.readthedocs.io](https://colin.readthedocs.io/en/latest/).\n\n![example](./docs/example.gif)\n\n# Features\n\n- Validate a selected artifact against a ruleset.\n- Artifacts can be container images and dockerfiles.\n- We provide a default ruleset we believe every container image should satisfy.\n- There is a ruleset to validate an artifact whether it complies to [Fedora Container Guidelines](https://fedoraproject.org/wiki/Container:Guidelines)\n- Colin can list available rulesets and list checks in a ruleset.\n- There is a python API available\n- Colin can be integrated into your workflow easily - it can provide results in json format.\n\n## Installation\n\n### Via `pip`\n\nIf you are on Fedora distribution, please install python3-pyxattr so you don't\nhave to compile it yourself when getting it from PyPI.\n\n```bash\n$ pip3 install --user colin\n```\n\n`colin` is supported on python 3.6+ only.\n\n### On Fedora distribution\n\ncolin is packaged in official Fedora repositories:\n\n```\n$ dnf install -y colin\n```\n\n### Requirements\n\n- For checking `image` target-type, you have to install [podman](https://github.com/containers/libpod/blob/master/docs/tutorials/podman_tutorial.md). If you need to check local docker images, you need to prefix your images with `docker-daemon` (e.g. `colin check docker-daemon:docker.io/openshift/origin-web-console:v3.11`).\n\n- If you want to use `oci` target, you need to install following tools:\n  - [umoci](https://github.com/opencontainers/umoci#install)\n  - [skopeo](https://github.com/containers/skopeo#skopeo-)\n\n## Usage\n\n```\n$ colin --help\nUsage: colin [OPTIONS] COMMAND [ARGS]...\n\n  COLIN -- Container Linter\n\nOptions:\n  -V, --version  Show the version and exit.\n  -h, --help     Show this message and exit.\n\nCommands:\n  check          Check the image/dockerfile (default).\n  info           Show info about colin and its dependencies.\n  list-checks    Print the checks.\n  list-rulesets  List available rulesets.\n```\n\n```\n$ colin check --help\nUsage: colin check [OPTIONS] TARGET\n\n  Check the image/dockerfile (default).\n\nOptions:\n  -r, --ruleset TEXT           Select a predefined ruleset (e.g. fedora).\n  -f, --ruleset-file FILENAME  Path to a file to use for validation (by\n                               default they are placed in\n                               /usr/share/colin/rulesets).\n  --debug                      Enable debugging mode (debugging logs, full\n                               tracebacks).\n  --json FILENAME              File to save the output as json to.\n  --stat                       Print statistics instead of full results.\n  -s, --skip TEXT              Name of the check to skip. (this option is\n                               repeatable)\n  -t, --tag TEXT               Filter checks with the tag.\n  -v, --verbose                Verbose mode.\n  --checks-path DIRECTORY      Path to directory containing checks (default\n                               ['/home/flachman/.local/lib/python3.7/site-\n                               packages/colin/checks']).\n  --pull                       Pull the image from registry.\n  --target-type TEXT           Type of selected target (one of image,\n                               dockerfile, oci). For oci, please specify\n                               image name and path like this: oci:path:image\n  --timeout INTEGER            Timeout for each check in seconds.\n                               (default=600)\n  --insecure                   Pull from an insecure registry (HTTP or invalid\n                               TLS).\n  -h, --help                   Show this message and exit.\n```\n\nLet's give it a shot:\n\n```\n$ colin -f ./rulesets/fedora.json registry.fedoraproject.org/f29/cockpit\nPASS:Label 'architecture' has to be specified.\nPASS:Label 'build-date' has to be specified.\nFAIL:Label 'description' has to be specified.\nPASS:Label 'distribution-scope' has to be specified.\n:\n:\nPASS:10 FAIL:8\n```\n\n### Directly from git\n\nIt's possible to use colin directly from git:\n\n```\n$ git clone https://github.com/user-cont/colin.git\n$ cd colin\n```\n\nWe can now run the analysis:\n\n```\n$ python3 -m colin.cli.colin -f ./rulesets/fedora.json registry.fedoraproject.org/f29/cockpit\nPASS:Label 'architecture' has to be specified.\nPASS:Label 'build-date' has to be specified.\nFAIL:Label 'description' has to be specified.\nPASS:Label 'distribution-scope' has to be specified.\n:\n:\nPASS:10 FAIL:8\n```\n\n### Exit codes\n\nColin can exit with several codes:\n\n- `0` --\u003e OK\n- `1` --\u003e error in the execution\n- `2` --\u003e CLI error, wrong parameters\n- `3` --\u003e at least one check failed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuser-cont%2Fcolin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuser-cont%2Fcolin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuser-cont%2Fcolin/lists"}