{"id":13625834,"url":"https://github.com/bcwaldon/warlock","last_synced_at":"2026-02-19T16:34:19.831Z","repository":{"id":653973,"uuid":"4524223","full_name":"bcwaldon/warlock","owner":"bcwaldon","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-30T17:18:43.000Z","size":142,"stargazers_count":148,"open_issues_count":10,"forks_count":44,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-12-07T12:21:05.218Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bcwaldon.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}},"created_at":"2012-06-01T20:52:55.000Z","updated_at":"2025-10-04T15:16:58.000Z","dependencies_parsed_at":"2024-01-14T07:11:16.719Z","dependency_job_id":"d5997383-649c-4521-9c4b-14d1622f8d3d","html_url":"https://github.com/bcwaldon/warlock","commit_stats":{"total_commits":127,"total_committers":21,"mean_commits":"6.0476190476190474","dds":0.6456692913385826,"last_synced_commit":"a9d65aea77800eead6724a675de1a037a8615c11"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/bcwaldon/warlock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcwaldon%2Fwarlock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcwaldon%2Fwarlock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcwaldon%2Fwarlock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcwaldon%2Fwarlock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcwaldon","download_url":"https://codeload.github.com/bcwaldon/warlock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcwaldon%2Fwarlock/sbom","scorecard":{"id":228926,"data":{"date":"2025-08-11","repo":{"name":"github.com/bcwaldon/warlock","commit":"058925a819c34769669c6b174a3d752111d9f1c2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.9,"checks":[{"name":"Code-Review","score":2,"reason":"Found 4/17 approved changesets -- score normalized to 2","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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yaml: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":"Maintained","score":10,"reason":"12 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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/ci.yaml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/bcwaldon/warlock/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/bcwaldon/warlock/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/bcwaldon/warlock/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/bcwaldon/warlock/ci.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yaml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/bcwaldon/warlock/ci.yaml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci.yaml:22","Warn: pipCommand not pinned by hash: .github/workflows/ci.yaml:41","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand 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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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: Apache License 2.0: 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":"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":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/ci.yaml:25"],"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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 19 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"}}]},"last_synced_at":"2025-08-17T04:26:42.895Z","repository_id":653973,"created_at":"2025-08-17T04:26:42.895Z","updated_at":"2025-08-17T04:26:42.895Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29622024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T13:04:20.082Z","status":"ssl_error","status_checked_at":"2026-02-19T13:03:33.775Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2024-08-01T21:02:03.317Z","updated_at":"2026-02-19T16:34:19.800Z","avatar_url":"https://github.com/bcwaldon.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Warlock 🧙‍♀️\n\n**Create self-validating Python objects using JSON schema.**\n\n[![PyPI](https://img.shields.io/pypi/v/warlock.svg)][warlock]\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/warlock.svg)][warlock]\n[![PyPI - Downloads](https://img.shields.io/pypi/dw/warlock.svg)][pypistats]\n\n[![Build Status](https://github.com/bcwaldon/warlock/actions/workflows/ci.yaml/badge.svg)][ci-builds]\n[![Coverage Status](https://coveralls.io/repos/github/bcwaldon/warlock/badge.svg?branch=master)][coveralls]\n![GitHub commits since latest release (branch)](https://img.shields.io/github/commits-since/bcwaldon/warlock/latest/master.svg)\n\n[![Package management: poetry](https://img.shields.io/badge/deps-poetry-blueviolet.svg)][poetry]\n[![Code Style Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black/)\n\n## Installation\n\nWarlock is [available on PyPI][warlock]:\n\n```shell\npip install warlock\n```\n\n## Usage\n\n1) Create your schema\n\n    ```python\n    \u003e\u003e\u003e schema = {\n        'name': 'Country',\n        'properties': {\n            'name': {'type': 'string'},\n            'abbreviation': {'type': 'string'},\n            'population': {'type': 'integer'},\n        },\n        'additionalProperties': False,\n    }\n    ```\n\n2) Create a model\n\n    ```python\n    \u003e\u003e\u003e import warlock\n    \u003e\u003e\u003e Country = warlock.model_factory(schema)\n    ```\n\n3) Create an object using your model\n\n    ```python\n    \u003e\u003e\u003e sweden = Country(name='Sweden', abbreviation='SE')\n    ```\n\n4) Let the object validate itself\n\n    ```python\n    \u003e\u003e\u003e sweden.name = 5\n    Traceback (most recent call last):\n    File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n    File \"warlock/core.py\", line 53, in __setattr__\n        raise InvalidOperation(msg)\n    warlock.core.InvalidOperation: Unable to set 'name' to '5'\n\n    \u003e\u003e\u003e sweden.overlord = 'Bears'\n    Traceback (most recent call last):\n      File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n      File \"warlock/core.py\", line 53, in __setattr__\n        raise InvalidOperation(msg)\n    warlock.core.InvalidOperation: Unable to set 'overlord' to 'Bears'\n    ```\n\n5) Generate a [JSON Patch document](http://tools.ietf.org/html/draft-ietf-appsawg-json-patch) to track changes\n\n    ```python\n    \u003e\u003e\u003e sweden.population=9453000\n    \u003e\u003e\u003e sweden.patch\n    '[{\"path\": \"/population\", \"value\": 9453000, \"op\": \"add\"}]'\n    ```\n\n[warlock]: https://pypi.org/project/warlock/\n[pip]: https://pip.pypa.io/en/stable/\n[ci-builds]: https://github.com/bcwaldon/warlock/actions/workflows/ci.yaml\n[coveralls]: https://coveralls.io/github/bcwaldon/warlock?branch=master\n[poetry]: https://poetry.eustace.io/docs/\n[pypistats]: https://pypistats.org/packages/warlock\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcwaldon%2Fwarlock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcwaldon%2Fwarlock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcwaldon%2Fwarlock/lists"}