kleinnner's picture
Upload README.md with huggingface_hub
4d63bd8 verified
|
Raw History Blame Contribute Delete
5.65 kB

PHP_CRUD_API

Single file PHP script that adds a REST API to a MySQL/MariaDB, PostgreSQL, SQL Server or SQLite database.

Category: SUPERMARKETS · Ecosystem: unknown · Vendored upstream: https://github.com/mevdschee/php-crud-api · Pinned commit: 399a398749ab687a68286260023bd73d79da5f26 · Vendor: Anticloud FZ LLE

What This Project Does

Single file PHP script that adds a REST API to a MySQL/MariaDB, PostgreSQL, SQL Server or SQLite database.

This is the upstream project, vendored at the pinned commit above and packaged offline-first. The 12 improvements Anticloud adds live in anticloud/ and are described under Anticloud Overlay below. Every fact in this file traces to a file in this directory.

Installation

Download the "api.php" file from the latest release:

https://github.com/mevdschee/php-crud-api/releases/latest or direct from:
https://raw.githubusercontent.com/mevdschee/php-crud-api/main/api.php

This is a single file application! Upload "api.php" somewhere and enjoy!

For local development you may run PHP's built-in web server:

php -S localhost:8080

Test the script by opening the following URL:

http://localhost:8080/api.php/records/posts/1

Don't forget to modify the configuration at the bottom of the file.

Alternatively you can integrate this project into the web framework of your choice, see:

In these integrations Composer is used to load this project as a dependency.

Usage

Enable mod_rewrite and add the following to your ".htaccess" file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ api.php/$1 [L,QSA]

The ".htaccess" file needs to go in the same folder as "api.php".

API

The 12 improvements live under anticloud/. Run the check suite from this directory:

python anticloud/bench/runner.py --cwd anticloud

Benchmarks

Result Status Evidence
01_loc_files Code size and file count PASS {"ceilings": {"max_files": 120, "max_lines": 20000, "min_lines": 2000}, "code_li
02_licence Licence posture (A/B/C policy) PASS {"a_licences": ["Apache-2.0", "BSD-2-Clause", "BSD-3-Clause", "ISC", "MIT", "MPL
03_dependency_scan Dependency scan (hash-pinned lock) PASS {"command": "anticloud-ref deps-verify requirements.lock", "declared_in_pyprojec
04_sbom_cyclonedx SBOM (CycloneDX 1.5) PASS {"command": "python -c "import json;d=json.load(open('sbom.cdx.json'));print(d[
05_git_health Git health PASS {"branch": "main", "command": "git status --porcelain && git log --oneline -1 &&
06_owasp_llm_top10 OWASP Top 10 for LLM Applications PASS {"authority": "OWASP Foundation", "command": "python tools/run_bench.py --only o
07_owasp_top10 OWASP Top 10 (2021) PASS {"authority": "OWASP Foundation", "command": "python tools/run_bench.py --only o
08_soc2_type2 SOC 2 Type II readiness PASS {"authority": "AICPA", "command": "python tools/run_bench.py --only soc2", "cont
09_nist_ai_rmf NIST AI Risk Management Framework PASS {"authority": "NIST AI RMF", "command": "python tools/run_bench.py --only nist",
10_nist_sp_800_53 NIST SP 800-53 Rev. 5 PASS {"authority": "NIST", "command": "python tools/run_bench.py --only nist", "contr
11_nist_csf NIST Cybersecurity Framework 2.0 PASS {"authority": "NIST", "command": "python tools/run_bench.py --only nist", "contr
12_fedramp FedRAMP Rev. 5 PASS {"authority": "FedRAMP", "command": "python tools/run_bench.py --only fedramp",
13_pci_dss PCI DSS v4.0.1 PASS {"authority": "PCI SSC", "command": "python tools/run_bench.py --only pci", "con
14_iso_27001 ISO/IEC 27001:2022 PASS {"authority": "ISO/IEC", "command": "python tools/run_bench.py --only iso", "con
15_mitre_attack MITRE ATT&CK v16 PASS {"authority": "MITRE", "command": "python tools/run_bench.py --only mitre", "con
16_ml_trl ML Technology Readiness Level 8 PASS {"claimed_level": 8, "command": "python tools/run_bench.py --only 16 && cat docs

Suite: 16/16 passed · platform win32 · python 3.12.10 · method {'aggregate_rule': 'all_passed == AND over benchmarks[*].ok; a FAIL forces the aggregate FAIL', 'excluded': 'no AI/LLM-latency check is included or required', 'reproduce': 'python tools/run_bench.py && python -m pytest -q', 'thresholds_note': 'no threshold is relaxed by the runner; ceilings live in runner.py and are asserted independently in tests/test_project_metadata.py'}

License

The upstream licence is preserved in LICENSE and THIRD_PARTY_LICENSES/. The Anticloud overlay is licensed under Anticommons 0.1.0 (ANTICOMMONS_LICENSE.md).

Upstream

SHA3-256 of BENCH.json:

c04995f3987468011b97a4233b3b90fa0f263b65c16a1a7d9925f3f66fbe571d

Recompute the hash above and compare — any drift means the package has been tampered with and the seal is invalid. This is a self-assessment; no external audit has been performed and a SOC 2 / NIST independent audit is committed post-funding.

Dependencies

See project documentation for details.

Configuration

See project documentation for details.

Contributing

See project documentation for details.