Skip to content

Security checks: Application

Application settings in .env and rConfig’s config files: debug mode, the application key, sessions, CORS and the files that hold secrets.

From V8.5.0, these checks run in php artisan rconfig:security-check and on Security Review. Run only this group with:

Terminal window
cd /var/www/html/rconfig8
php artisan rconfig:security-check --only=app

Each failing check shows the exact fix for your server, including paths, on the page and in the command output. The sections below explain what each check looks for.

Check Severity Checks that
app.debug Critical Debug mode is off
app.env High Environment is production
app.key Critical Application key is set and unique
app.previous_key Low No retired application keys left in .env
app.url_https High rConfig is served over HTTPS
app.session_cookie Medium Session cookie is Secure, HttpOnly and SameSite
app.session_lifetime Low Idle sessions expire
app.cors High Cross-origin requests cannot carry credentials from any site
app.demo_mode High Demo mode is off
app.log_level Low Logs are not at debug level
app.env_file_perms High .env is not readable by other local users
app.env_backups High .env backups are not readable by other local users

Check ID: app.debug · Severity: Critical

With APP_DEBUG on, any error page shows stack traces, file paths, environment values and database details to whoever triggered it, including people who are not signed in.

References: NIST SI-11, OWASP ASVS V14.3, NIS2 21(2)(e), SEC-INT-002


Check ID: app.env · Severity: High

Laravel relaxes several protections outside production. In the local environment the Horizon dashboard opens to anyone, without its sign-in gate.

References: NIST CM-6, CIS Controls 4.1


Check ID: app.key · Severity: Critical

APP_KEY encrypts the stored device, enable and integration passwords and signs sessions. A missing, malformed or published key lets anyone who has it decrypt those secrets or forge a session.

References: NIST SC-12, NIST SC-28, NIS2 21(2)(h)


Check ID: app.previous_key · Severity: Low

After a key rotation, APP_PREVIOUS_KEYS lets rConfig read data encrypted with the old key. Once re-encryption has finished it only widens what a leaked .env exposes.

References: NIST SC-12


Check ID: app.url_https · Severity: High

Over plain HTTP, sign-in passwords, session cookies, API tokens and device credentials cross the network unencrypted.

References: NIST SC-8, NIS2 21(2)(h), OWASP ASVS V9.1


Section titled “Session cookie is Secure, HttpOnly and SameSite”

Check ID: app.session_cookie · Severity: Medium

The session cookie is the signed-in user. HttpOnly keeps scripts from reading it, Secure keeps it off plain HTTP, and SameSite stops other sites sending it with forged requests.

References: NIST SC-23, OWASP ASVS V3.4, NIS2 21(2)(i)


Check ID: app.session_lifetime · Severity: Low

A short idle timeout limits what an unlocked, unattended browser or a stolen session cookie can do.

References: NIST AC-12, OWASP ASVS V3.3


Cross-origin requests cannot carry credentials from any site

Section titled “Cross-origin requests cannot carry credentials from any site”

Check ID: app.cors · Severity: High

Allowing every origin is safe only while credentials are not allowed: browsers never send cookies to a wildcard origin. Wildcard origins with credentials let any website act as the signed-in user.

References: NIST SC-7, OWASP ASVS V14.5


Check ID: app.demo_mode · Severity: High

Demo mode is for rConfig’s public demo site only. It reseeds data, shows demo personas and changes what pages can do.

References: NIST CM-6


Check ID: app.log_level · Severity: Low

Debug logging records request and connection detail that can include device output and secrets, and logs are often shared with support or shipped elsewhere.

References: NIST AU-9, NIST SI-11, SEC-INT-002


Check ID: app.env_file_perms · Severity: High

.env holds the database password, APP_KEY, the Redis password and integration secrets. Any local account that can read it can decrypt every stored credential.

In-app fix: users with the security.update permission can click Remove access for other users on the finding. rConfig shows what will change first, records the fix in the activity log and runs the checks again.

References: NIST AC-6, NIST SC-28, CIS RHEL 9 6.1, NIS2 21(2)(i)


.env backups are not readable by other local users

Section titled “.env backups are not readable by other local users”

Check ID: app.env_backups · Severity: High

rConfig keeps weekly copies of .env. Each copy holds the same secrets as .env itself, so it needs the same protection.

In-app fix: users with the security.update permission can click Make .env backups private on the finding. rConfig shows what will change first, records the fix in the activity log and runs the checks again.

References: NIST AC-6, NIST SC-28, NIS2 21(2)(c)


See Hardening guides for the configuration snippets behind these checks, and NIS2 Article 21 mapping for the controls they give evidence for.