{"id":15025710,"url":"https://github.com/austinheap/php-security-txt","last_synced_at":"2025-10-03T23:32:22.507Z","repository":{"id":62489632,"uuid":"108443771","full_name":"austinheap/php-security-txt","owner":"austinheap","description":"A package for manipulating `security.txt` documents in PHP 7+, based on configuration settings. https://securitytext.org/","archived":true,"fork":false,"pushed_at":"2018-01-26T19:29:51.000Z","size":909,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-17T01:12:04.631Z","etag":null,"topics":["composer","composer-package","php","php7","php70","php71","php72","security","security-txt"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/austinheap/php-security-txt","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/austinheap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-26T17:28:40.000Z","updated_at":"2023-01-28T09:42:51.000Z","dependencies_parsed_at":"2022-11-02T11:15:48.336Z","dependency_job_id":null,"html_url":"https://github.com/austinheap/php-security-txt","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinheap%2Fphp-security-txt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinheap%2Fphp-security-txt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinheap%2Fphp-security-txt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinheap%2Fphp-security-txt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/austinheap","download_url":"https://codeload.github.com/austinheap/php-security-txt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235204448,"owners_count":18952326,"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":["composer","composer-package","php","php7","php70","php71","php72","security","security-txt"],"created_at":"2024-09-24T20:02:52.831Z","updated_at":"2025-10-03T23:32:22.026Z","avatar_url":"https://github.com/austinheap.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP 7+ `security.txt` Package\n\n![php-security-txt banner from the documentation](docs/img/banner-1544x500.png?raw=true)\n\n[![License](https://img.shields.io/packagist/l/austinheap/php-security-txt.svg)](https://github.com/austinheap/php-security-txt/blob/master/LICENSE.md)\n[![Current Release](https://img.shields.io/github/release/austinheap/php-security-txt.svg)](https://github.com/austinheap/php-security-txt/releases)\n[![Total Downloads](https://img.shields.io/packagist/dt/austinheap/php-security-txt.svg)](https://packagist.org/packages/austinheap/php-security-txt)\n[![Build Status](https://travis-ci.org/austinheap/php-security-txt.svg?branch=master)](https://travis-ci.org/austinheap/php-security-txt)\n[![Dependency Status](https://gemnasium.com/badges/github.com/austinheap/php-security-txt.svg)](https://gemnasium.com/github.com/austinheap/php-security-txt)\n[![Scrutinizer CI](https://scrutinizer-ci.com/g/austinheap/php-security-txt/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/austinheap/php-security-txt/)\n[![StyleCI](https://styleci.io/repos/108443771/shield?branch=master)](https://styleci.io/repos/108443771)\n[![Maintainability](https://api.codeclimate.com/v1/badges/9bf8799e6e3a0209c318/maintainability)](https://codeclimate.com/github/austinheap/php-security-txt/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/9bf8799e6e3a0209c318/test_coverage)](https://codeclimate.com/github/austinheap/php-security-txt/test_coverage)\n[![SensioLabs](https://insight.sensiolabs.com/projects/1edfb22e-593b-43b1-88cd-98965541a2cc/mini.png)](https://insight.sensiolabs.com/projects/1edfb22e-593b-43b1-88cd-98965541a2cc)\n\n## A package for manipulating `security.txt` documents in PHP 7+, based on configuration settings.\n\nThe purpose of this project is to create a set-it-and-forget-it package that can\nmanipulate documents following the current [`security.txt`](https://securitytxt.org/)\nspec. It is therefore highly opinionated but built for configuration.\n\n[`security.txt`](https://github.com/securitytxt) is a [draft](https://tools.ietf.org/html/draft-foudil-securitytxt-00)\n\"standard\" which allows websites to define security policies. This \"standard\"\nsets clear guidelines for security researchers on how to report security issues,\nand allows bug bounty programs to define a scope. Security.txt is the equivalent\nof `robots.txt`, but for security issues.\n\nThere is [documentation for `php-security-txt` online](https://austinheap.github.io/php-security-txt/),\nthe source of which is in the [`docs/`](https://github.com/austinheap/php-security-txt/tree/master/docs)\ndirectory. The most logical place to start are the [docs for the `SecurityTxt` class](https://austinheap.github.io/php-security-txt/classes/AustinHeap.Security.Txt.SecurityTxt.html).\n\n## Table of Contents\n\n* [Summary](#a-package-for-manipulating-securitytxt-documents-in-php-7-based-on-configuration-settings)\n* [Installation](#installation)\n    + [Step 1: Composer](#step-1-composer)\n    + [Step 2: Manipulate a `security.txt` document](#step-2-manipulate-a-securitytxt-document)\n* [Unit Tests](#unit-tests)\n* [References](#references)\n* [Credits](#credits)\n* [License](#license)\n\n## Installation\n\n### Step 1: Composer\n\nVia Composer command line:\n\n```bash\n$ composer require austinheap/php-security-txt\n```\n\nOr add the package to your `composer.json`:\n\n```json\n{\n    \"require\": {\n        \"austinheap/php-security-txt\": \"0.3.*\"\n    }\n}\n```\n\n### Step 2: Manipulate a `security.txt` document\n\nTo programatically create a `security.txt` document, you could do:\n\n```php\nrequire_once 'vendor/autoload.php';\n\n$writer = new \\AustinHeap\\Security\\Txt\\Writer;\n\nprint $writer-\u003esetContact('me@austinheap.com')\n             -\u003esetEncryption('http://some.url/pgp.key')\n             -\u003esetDisclosure('full')\n             -\u003esetAcknowledgement('http://some.url/acks')\n             -\u003egetText();\n```\n\nWhich should output:\n\n```\n# Our security address\nContact: me@austinheap.com\n\n# Our PGP key\nEncryption: http://some.url/pgp.key\n\n# Our disclosure policy\nDisclosure: Full\n\n# Our public acknowledgement\nAcknowledgement: http://some.url/acks\n\n#\n# Generated by \"php-security-txt\" v0.3.2 (https://github.com/austinheap/php-security-txt/releases/tag/v0.3.2)\n# in 0.041008 seconds on 2017-10-26 20:31:25.\n#\n```\n\n## Unit Tests\n\nThis package has aggressive unit tests built with PHPUnit.\n\nThere are [code coverage reports for `php-security-txt`](https://austinheap.github.io/php-security-txt/coverage/)\navailable online.\n\n## References\n\n- [A Method for Web Security Policies (draft-foudil-securitytxt-00)](https://tools.ietf.org/html/draft-foudil-securitytxt-00)\n- [laravel-security-txt](https://github.com/austinheap/laravel-security-txt)\n- [securitytext.org](https://securitytext.org/)\n\n## Credits\n\nThis is a fork of [austinheap/laravel-security-txt](https://github.com/austinheap/laravel-security-txt),\nwhich was a fork of [InfusionWeb/laravel-robots-route](https://github.com/InfusionWeb/laravel-robots-route),\nwhich was a fork of [ellisthedev/laravel-5-robots](https://github.com/ellisthedev/laravel-5-robots),\nwhich was a fork of [jayhealey/Robots](https://github.com/jayhealey/Robots),\nwhich was based on earlier work.\n\n- [ellisio/laravel-5-robots Contributors](https://github.com/ellisio/laravel-5-robots/graphs/contributors)\n- [InfusionWeb/laravel-robots-route Contributors](https://github.com/InfusionWeb/laravel-robots-route/contributors)\n- [austinheap/laravel-security-txt Contributors](https://github.com/austinheap/laravel-security-txt/graphs/contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustinheap%2Fphp-security-txt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faustinheap%2Fphp-security-txt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustinheap%2Fphp-security-txt/lists"}