{"id":16353690,"url":"https://github.com/gagliardetto/codemill","last_synced_at":"2025-03-23T01:31:05.434Z","repository":{"id":47701209,"uuid":"304892751","full_name":"gagliardetto/codemill","owner":"gagliardetto","description":"CodeQL model generation for Go.","archived":false,"fork":false,"pushed_at":"2021-06-11T13:38:43.000Z","size":8785,"stargazers_count":17,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T16:14:00.733Z","etag":null,"topics":["codegenerator","codeql","codeql-models"],"latest_commit_sha":null,"homepage":"","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/gagliardetto.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}},"created_at":"2020-10-17T14:12:36.000Z","updated_at":"2024-08-12T20:06:50.000Z","dependencies_parsed_at":"2022-09-26T20:01:34.078Z","dependency_job_id":null,"html_url":"https://github.com/gagliardetto/codemill","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagliardetto%2Fcodemill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagliardetto%2Fcodemill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagliardetto%2Fcodemill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagliardetto%2Fcodemill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gagliardetto","download_url":"https://codeload.github.com/gagliardetto/codemill/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245043894,"owners_count":20551845,"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":["codegenerator","codeql","codeql-models"],"created_at":"2024-10-11T01:30:12.892Z","updated_at":"2025-03-23T01:31:04.928Z","avatar_url":"https://github.com/gagliardetto.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## codemill\n\n`codemill` helps with the creation of codeql models for Go.\n\nYou build a spec of a module in a browser-based UI, adding models and selectors to it, and then it generates the corresponding codeql and go code.\n\n\n### Currently supported codeql models\n\n- **TaintTracking** - DONE\n- **UntrustedFlowSource** - DONE\n- **HTTP::HeaderWrite** - WIP\n- **HTTP::Redirect** - WIP\n- **HTTP::ResponseBody** - WIP\n\n## Install\n\nYou can install codemill cloning this repo and running `make install`; you need Go \u003c 1.16.\n\n**NOTE**: Go 1.16 will be supported soon (WIP).\n\n## Example generated code\n\nYou can see an example of what `codemill` can generate here: https://github.com/github/codeql-go/pull/438/files\n\n## Example: gin\n\n```bash\n# Welcome to a `codemill` basic usage example\n# First' let's create a folder for our codemill files\nmkdir my-codemill \u0026\u0026 cd my-codemill\n# Then we need a folder for the projects' specs\nmkdir specs\n# And a folder for generated files\nmkdir generated\n# Now we're ready for creating our first spec\n# In this example I will create a very incomplete model for the gin web framework\ncodemill --spec=./specs/Gin.json --dir=./generated --http=true --gen=true\n```\n\n![codemill-initial-setup](https://user-images.githubusercontent.com/15271561/109022902-f326b580-76c4-11eb-856c-4969ea5f80d3.gif)\n\nAfter that, let's open [http://127.0.0.1:8070/](http://127.0.0.1:8070/) in a browser, and edit the spec.\n\nThe first model we will add to the `Gin` spec is an `UntrustedFlowSource` model, which defines sources of user-defined input:\n\n![codemill-gin-untrustedflowsource](https://user-images.githubusercontent.com/15271561/113894302-8aa51b00-97d0-11eb-9645-c2a4f1d26958.gif)\n\nThe second model we will add to the `Gin` spec is a `TaintTracking` model, which defines taint propagation in functions and methods:\n\n![codemill-gin-tainttracking](https://user-images.githubusercontent.com/15271561/109023904-db9bfc80-76c5-11eb-9449-f264bc3b8886.gif)\n\nNow our spec is done, let's go back to the terminal and hit `CTRL+C` to close the program.\n\nOn exit, `codemill` will save the `Gin` spec we just created to `specs/Gin.json`, and generate codeql and go files in a timestamped folder inside the `generated/` folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgagliardetto%2Fcodemill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgagliardetto%2Fcodemill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgagliardetto%2Fcodemill/lists"}