{"id":36988420,"url":"https://github.com/designsecurity/laf","last_synced_at":"2026-01-13T23:25:48.284Z","repository":{"id":56966110,"uuid":"177421484","full_name":"designsecurity/laf","owner":"designsecurity","description":"Language application firewall","archived":false,"fork":false,"pushed_at":"2019-07-25T07:28:35.000Z","size":1763,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-25T09:41:32.311Z","etag":null,"topics":[],"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/designsecurity.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":"2019-03-24T13:53:15.000Z","updated_at":"2024-04-25T09:41:32.311Z","dependencies_parsed_at":"2022-08-21T06:10:16.841Z","dependency_job_id":null,"html_url":"https://github.com/designsecurity/laf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/designsecurity/laf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designsecurity%2Flaf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designsecurity%2Flaf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designsecurity%2Flaf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designsecurity%2Flaf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/designsecurity","download_url":"https://codeload.github.com/designsecurity/laf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designsecurity%2Flaf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":"2026-01-13T23:25:47.771Z","updated_at":"2026-01-13T23:25:48.279Z","avatar_url":"https://github.com/designsecurity.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# laf\n\u003e A language application firewall  \n\u003e Only PHP is currently supported\n\n[![Build Status](https://travis-ci.org/designsecurity/laf.svg?branch=master)](https://travis-ci.org/designsecurity/laf) [![Packagist](https://img.shields.io/packagist/v/designsecurity/laf.svg)](https://packagist.org/packages/designsecurity/laf) [![Packagist](https://img.shields.io/packagist/l/designsecurity/laf.svg)](LICENSE)\n---\n## Example\n- Embed your code between $detector-\u003estart() and $detector-\u003efinish()\n- If attacks are detected, alarms are generated and can be retrieved with $detector-\u003egetAlarms()\n\n```php\n\u003c?php\n    $detector = new Ids\\Detector;\n    $detector-\u003estart();\n        \n    include(\"yourcode.php\");\n\n    $detector-\u003efinish();\n    \n    var_dump($detector-\u003egetAlarms());\n?\u003e\n```\n\nwhen yourcode.php is vulnerable to an attack (in this example a simulated XSS attack) :\n```php\n\u003c?php\n\n$detector-\u003egetHttprequest()-\u003egetRequest()-\u003equery-\u003eset(\"vuln\", \"ee\\\" onClick=alert('eee') \\\"boum\");\n$vulnparam = $detector-\u003egetHttprequest()-\u003egetRequest()-\u003equery-\u003eget(\"vuln\");\n\necho \"\u003ca href=\\\"$vulnparam\\\"\u003e\u003c/a\u003e\";\n```\n\nthis alarm is generated :\n```javascript\n{\n  [0]=\u003e\n  object(laf\\Alarming\\Alarm)#24 (4) {\n    [\"attack\":\"laf\\Alarming\\Alarm\":private]=\u003e\n    string(3) \"xss\"\n    [\"description\":\"laf\\Alarming\\Alarm\":private]=\u003e\n    string(38) \"in vuln ee\" onClick=alert('eee') \"boum\"\n    [\"score\":\"laf\\Alarming\\Alarm\":private]=\u003e\n    int(0)\n    [\"time\":\"laf\\Alarming\\Alarm\":private]=\u003e\n    string(15) \"190725 09:19:13\"\n  }\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesignsecurity%2Flaf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdesignsecurity%2Flaf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesignsecurity%2Flaf/lists"}