https://github.com/wireghoul/safelity
Secure programming library for PHP
https://github.com/wireghoul/safelity
Last synced: about 2 months ago
JSON representation
Secure programming library for PHP
- Host: GitHub
- URL: https://github.com/wireghoul/safelity
- Owner: wireghoul
- License: agpl-3.0
- Created: 2020-09-12T03:58:58.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-17T00:32:56.000Z (about 3 years ago)
- Last Synced: 2025-01-19T17:24:03.325Z (3 months ago)
- Language: PHP
- Size: 24.4 KB
- Stars: 3
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Audit: audit.sh
Awesome Lists containing this project
README
safelity
=================================================
Secure programming library for PHP, written as a proof of concept by Eldar "Wireghoul" Marcussen - http://www.justanotherhacker.com. Developed as part of my presentation at GIDS on [codified security](https://wurreka.com/ict/virtual-conference/web/session/codified-security).Concept
---------------------------------------
The idea was to write a library that allows developers to write secure code in a way that is similar to how they would write code otherwise. This library ensures that the code only executes the intended functionality without the need for input validation or encoding of special characters. In order to achieve this, some limitations were introduced. The following requirements/objectives were set:* PHP
* Linux
* Web based usage
* Small adjustment for developers
* No need for input validation
* AuditablePoC
---------------------------------------
Security claims should not be made lightly, a challenge to hack the library was made public on the internet. While the challenge is no longer hosted example scripts are provided in the `poc/` directory and you can try to hack them yourself:
```bash
cd poc/
php -S 0:8000
```
The challenge files are now accessible via in your browser.Usage of the library can also be audited by running `./audit.sh ` from the command line.
Inspiration
---------------------------------------
This library was inspired by a number of posts/opinions, but the following deserve a special mention:
* Making wrong code look wrong -
* Anti if campaign -
* c2 wiki -