{"id":27431833,"url":"https://github.com/existenznl/permcheck","last_synced_at":"2025-04-14T15:35:14.851Z","repository":{"id":51239526,"uuid":"49225834","full_name":"eXistenZNL/PermCheck","owner":"eXistenZNL","description":"PermCheck is a little tool that checks if the files in a PHP project have the executable bit set properly.","archived":false,"fork":false,"pushed_at":"2025-04-13T10:42:32.000Z","size":207,"stargazers_count":9,"open_issues_count":6,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T11:35:41.345Z","etag":null,"topics":["executable","executable-file","php","security","security-tools","security-vulnerability"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/eXistenZNL.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-07T19:29:24.000Z","updated_at":"2025-04-13T10:42:35.000Z","dependencies_parsed_at":"2023-09-30T13:30:57.776Z","dependency_job_id":"5c9b981f-0989-4258-872a-c2ba76847b34","html_url":"https://github.com/eXistenZNL/PermCheck","commit_stats":{"total_commits":52,"total_committers":4,"mean_commits":13.0,"dds":0.2692307692307693,"last_synced_commit":"eddb19d588e68b773416e109ee3fe8d7476760f0"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eXistenZNL%2FPermCheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eXistenZNL%2FPermCheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eXistenZNL%2FPermCheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eXistenZNL%2FPermCheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eXistenZNL","download_url":"https://codeload.github.com/eXistenZNL/PermCheck/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248906987,"owners_count":21181255,"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":["executable","executable-file","php","security","security-tools","security-vulnerability"],"created_at":"2025-04-14T15:33:28.327Z","updated_at":"2025-04-14T15:35:14.845Z","avatar_url":"https://github.com/eXistenZNL.png","language":"PHP","readme":"# PermCheck\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/eXistenZNL/PermCheck/tests.yaml?branch=master\u0026style=flat-square)](https://github.com/eXistenZNL/PermCheck/actions) [![Packagist](https://img.shields.io/packagist/v/existenznl/permcheck.svg?style=flat-square)](https://packagist.org/packages/existenznl/permcheck)  [![Packagist](https://img.shields.io/packagist/dm/existenznl/permcheck.svg?style=flat-square)](https://packagist.org/packages/existenznl/permcheck/stats) [![Packagist](https://img.shields.io/packagist/l/existenznl/permcheck.svg?style=flat-square)](https://github.com/eXistenZNL/PermCheck/blob/master/LICENSE) [![Sponsors](https://img.shields.io/github/sponsors/eXistenZNL?color=hotpink\u0026style=flat-square)](https://github.com/sponsors/eXistenZNL)\n\n## About\n\nPermCheck is a little tool that checks if the files in a project have the executable bit set properly.\nIt's available for PHP versions 5.6 and up (Version 1.0 goes back to PHP 5.3), and is very light on dependencies, so you should be able to add it to nearly any project.\n\nPermCheck aims to prevent inconsistent executable bits and thus random executable files in a project, which makes a project more consistent and more secure.\n\n## Installation\n\nPermCheck can be added as a composer package by running:\n\n    composer require --dev existenznl/permcheck\n\n## Configuration\n\nPermCheck uses a XML configuration file which contains the sections directories and executables.\n\nThe directories section should contain all project directories that are to be checked, and the executables section should contain all files that are supposed to be executable. All files that are found but are not in the executables section, are considered to be expected non executable.\n\nAn example:\n\n```xml\n\u003cpermcheck\u003e\n    \u003cexcludes\u003e\n        \u003cdir\u003e.git\u003c/dir\u003e\n        \u003cdir\u003evendor/\u003c/dir\u003e\n        \u003cfile\u003edontcare.sh\u003c/file\u003e\n    \u003c/excludes\u003e\n    \u003cexecutables\u003e\n        \u003cfile\u003ecli/console\u003c/file\u003e\n    \u003c/executables\u003e\n\u003c/permcheck\u003e\n```\n\nIn the example configuration above, everything but the dirs .git and vendor and the file dontcare.sh is validated, and only the file cli/console must be executable.\n\nIf it's not, PermCheck will issue an error.\n\nIf any other files are executable, PermCheck will issue an error.\n\n## Usage\n\nWith a configuration XML stored somewhere in your codebase, we can now start using PermCheck.\n\nExecuting permcheck is straightforward by running the command with the required / needed flags and options.\n\n`vendor/bin/permcheck \u003c--config|-c=...\u003e [--directory|-d=...]`\n\nPermCheck makes use of the Symfony 2 [Console Component](http://symfony.com/doc/current/components/console/introduction.html) so the flags and options can be specified in the various formats outlined in the SF2 Console Component documentation.\n\nThe following options and flags are available:\n\n| Option/flag  | Shorthand | Mandatory | Description                                                                   |\n| ------------ |-----------| --------- | ----------------------------------------------------------------------------- |\n| --config     | -c        | Yes       | The location of the configuration XML.                                        |\n| --directory  | -d        | No        | De location of the base directory, defaults to the current working directory. |\n\n## Bugs, questions, and improvements\n\nIf you found a bug or have a question, please open an issue on the GitHub Issue tracker.\nImprovements can be sent by a Pull Request against the develop branch and are greatly appreciated!\n\n","funding_links":["https://github.com/sponsors/eXistenZNL"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexistenznl%2Fpermcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexistenznl%2Fpermcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexistenznl%2Fpermcheck/lists"}