{"id":37081330,"url":"https://github.com/hesa/scarfer","last_synced_at":"2026-01-14T09:52:53.859Z","repository":{"id":43319503,"uuid":"443099379","full_name":"hesa/scarfer","owner":"hesa","description":"Source Code scan report file reporter","archived":false,"fork":false,"pushed_at":"2025-07-29T09:07:35.000Z","size":7233,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-29T11:40:57.941Z","etag":null,"topics":["compliance","compliance-automation","tool"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hesa.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","contributing":null,"funding":null,"license":"LICENSES/CC-BY-4.0.txt","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,"zenodo":null}},"created_at":"2021-12-30T14:33:11.000Z","updated_at":"2025-07-29T09:07:38.000Z","dependencies_parsed_at":"2025-03-21T00:31:30.807Z","dependency_job_id":null,"html_url":"https://github.com/hesa/scarfer","commit_stats":{"total_commits":95,"total_committers":1,"mean_commits":95.0,"dds":0.0,"last_synced_commit":"317f353bc2f8d3add994090dc161f44f98eccceb"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/hesa/scarfer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hesa%2Fscarfer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hesa%2Fscarfer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hesa%2Fscarfer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hesa%2Fscarfer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hesa","download_url":"https://codeload.github.com/hesa/scarfer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hesa%2Fscarfer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"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":["compliance","compliance-automation","tool"],"created_at":"2026-01-14T09:52:53.054Z","updated_at":"2026-01-14T09:52:53.851Z","avatar_url":"https://github.com/hesa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scarfer\n\nSource code scan report file reporter\n\n# Introduction\n\nScarfer outputs compliance related information from a scan report.\n\nA scan report contain lots of information, for example Scancode has 37\nentries on the top level for each file, about a file and it is\nsometimes cumbersome to open with an editor to extract the information\nwanted. Scarfer provides a quick command line access to scan reports.\n\n# Features\n\nScarfer can output the following information per file:\n\n* copyright (using `-c`)\n\n* license (using `-l`)\n\n* text that caused the license detection (`-m`)\n\nScarfer can output the following summaries\n\n* license summary (using `-ls`)\n\n* copyright summary (using `-cs`)\n\n## Filter\n\nScarfer can filter files:\n\n* include files with:\n\n    * license name (`-il`) using Python's regular expressions\n\n    * files (`-if`) using Python's regular expressions\n\n    * files (`-iff`) by reading a file, containing file names, using Python's regular expressions\n\n    * copyright (`-ec`) using Python's regular expressions\n\n* exclude files with:\n\n    * license name (`-el`) using Python's regular expressions\n\n    * files (`-ef`) using Python's regular expressions\n\n    * files (`-eff`) by reading a file, containing file names, using Python's regular expressions\n\n    * copyright (`-ec`) using Python's regular expressions\n\n*Note: if you're using more than one filter then filters are AND:ed together*\n\n## Curate\n\nScarfer can curate (fix, amend) license identifications:\n\n* curate license (`-cml`) for all files with missing license\n\n* curate license (`-cfl`) for all files matching Python's regular expressions\n\n## Configuration file\n\nScarfer can write and read configuration files:\n\n* output current (`-oc`) command line options to a configuration output\n\n* read configuration file (`--config`)\n\n# Example use\n\nOutput the file names (full path) of all the files in the Scancode report `example-data/cairo-1.16.0-scan.json`:\n```\n$ scarfer example-data/cairo-1.16.0-scan.json \n```\n\nAs above but output only files with path matching `drm`:\n```\n$ scarfer example-data/cairo-1.16.0-scan.json -if drm\n```\n\nOutput the file names (full path) of all the files in the Scancode report `example-data/cairo-1.16.0-scan.json` with a license matching `gpl-3`:\n```\n$ scarfer example-data/cairo-1.16.0-scan.json -il gpl-3\n```\n\nOutput the file names (full path) of all the files in the Scancode report `example-data/cairo-1.16.0-scan.json` with a license matching `mpl` and files with path matching `drm`. The output should also contain information (per file) about license and copyright:\n```\n$ scarfer example-data/cairo-1.16.0-scan.json -il mpl -if drm -c -l \n```\n\nTo filter in all files containing \"/*pdi\" and ending with \".c\":\n```\n$ scarfer example-data/cairo-1.16.0-scan.json -if \"/.*pdi.*\\.c$\"\n```\n\nTo filter out all files containing \"/*pdi\" and ending with \".c\":\n```\n$ scarfer example-data/cairo-1.16.0-scan.json -ef \"/.*pdi.*\\.c$\"\n```\n\n# Supported scan report formats\n\n* [Scancode](https://github.com/nexB/scancode-toolkit) Toolkit, version 21 and upwards\n\n* [Scancode](https://github.com/nexB/scancode-toolkit) Output Format version 1.0.0, 2.0.0, 3.0, 3.2, 4.0, 4.1.0\n\n# Hints on source code scanners\n\n## Scancode 32.0*\n\nAssuming you want to scan a directory called `cairo` and store the output in `cairo-scan.json`:\n\n```\nscancode -clipe \\\n  --license-text   --license-text-diagnostics        \\\n  --classify       --license-clarity-score --summary \\\n  -n $(cat /proc/cpuinfo | grep processor | wc -l)   \\\n  --json-pp cairo-scan.json cairo\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhesa%2Fscarfer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhesa%2Fscarfer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhesa%2Fscarfer/lists"}