# System Application Audit Tool Bundle

This bundle contains:

- `audit.md` — generic system audit design for apps under `apps/<app-name>`
- `system.app.audit.sh` — read-only local/CI preflight script

## Install

Copy both files to a system-owned tools/docs location. Example:

```bash
mkdir -p /home/intel145/websites/system/docs
mkdir -p /home/intel145/websites/system/bin
cp audit.md /home/intel145/websites/system/docs/
cp system.app.audit.sh /home/intel145/websites/system/bin/
chmod 0755 /home/intel145/websites/system/bin/system.app.audit.sh
```

## Use

Filesystem-only audit:

```bash
/home/intel145/websites/system/bin/system.app.audit.sh defapp
```

Audit with optional configured public-origin checks:

```bash
/home/intel145/websites/system/bin/system.app.audit.sh   defapp   https://apps.intellihometech.com
```

The script is intentionally read-only. It does not alter files, servers, Nginx configuration, permissions, databases, or sessions.

## Notes

- The script derives a conventional public route as `<BASE_URL>/<app-name>/`.
- Apps with different public base paths should use a future app registry/policy file rather than changing the script to accept arbitrary URL paths.
- Production Nginx access rules belong in Nginx/hosting configuration, never `.htaccess`.
