Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Config Secrets Laravel Package

audunru/config-secrets

A Laravel package for keeping sensitive configuration values encrypted at rest. Store secrets safely in your config files or environment, then decrypt them at runtime so your application can use them without exposing plaintext in source control.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

What it is: audunru/config-secrets is a Laravel package that lets you keep configuration secrets (API keys, DB passwords, third-party credentials) encrypted inside your committed config files, using Laravel's own encrypter (APP_KEY). Encrypted values are decrypted at config/bootstrap time, so the rest of the application reads plaintext config values exactly as it does today. It ships artisan tooling to encrypt a value and paste the ciphertext into config/*.php.

Architecture fit: Fits cleanly into a standard Laravel architecture because it does not introduce a new runtime abstraction — it is a config-value transformation, not a secrets manager. It is a good fit if the org's problem is "we want secrets to live next to the code and be deployable by anyone with the repo + APP_KEY," and a poor fit if the requirement is dynamic secrets, per-environment isolation with distinct keys, lease/TTL semantics, or audited access. It does not replace Vault/AWS Secrets Manager/Azure Key Vault; it is a lighter-weight alternative for teams that do not want that operational overhead.

Integration feasibility: Low-effort integration. Composer install, publish config, optionally register the service provider (package discovery is standard), run the encryption command, replace plaintext values with ciphertext, commit. A single engineer can typically land it in a sprint for one application. The real work is not code — it is key management and the team convention for which keys are encrypted.

Technical risk:

  • Single point of failure is APP_KEY. All encrypted config values are only recoverable with the key that encrypted them. Rotating APP_KEY (which Laravel security guidance periodically recommends, and which php artisan key:generate makes trivially easy to do by accident) silently invalidates every stored secret. This is the dominant risk and the one most likely to cause an outage.
  • Boot-time failure mode. Decryption happens during config resolution; a wrong/missing key or a corrupted ciphertext blob typically surfaces as an exception during boot, i.e. a hard 500 or a failed queue worker/cron, not a degraded feature. Blast radius is the whole application.
  • Secrets live in git history forever. Ciphertext plus a shared key means anyone with repo read access and the key has the plaintext. Revocation requires rotating the underlying credential at the provider and re-encrypting — there is no built-in rotation workflow.
  • v7.1.0 itself is low risk. The release adds a Trivy security-scan workflow to the package's own CI. No runtime code, no public API, no config schema, no dependency changes. Consumer action required: none. It is a positive upstream hygiene signal, not a functional change.
  • Upstream concentration. Small-maintainer package; verify license, security disclosure policy, and release cadence before depending on it for production credentials.

Key questions to answer before adoption:

  1. Which PHP and Laravel versions does v7.1.0 support, and is Laravel 12 / PHP 8.4 in the matrix? (Confirm from composer.json, do not assume.)
  2. How are decryption failures surfaced — exception, null, or fallback to raw value? This determines whether a key mismatch is a loud outage or a silent misconfiguration.
  3. Is there support for multiple/rotating keys (key ID prefix, key ring), or is APP_KEY strictly single?
  4. Does it interact correctly with php artisan config:cache, and what is the re-encryption + redeploy procedure?
  5. What is the documented recovery path if APP_KEY is lost or rotated — is there any re-encryption tooling?
  6. License, maintainer responsiveness, and whether a security policy/CVE process exists.

Integration Approach

Stack fit: Drop-in for any conventional Laravel app (monolith, API, or a Laravel service in a larger estate) that already uses APP_KEY for session/cookie encryption. Works alongside existing .env usage — you can encrypt a subset of config keys and leave the rest in environment variables, which is the recommended incremental posture. It does not fit serverless/edge runtimes where you cannot ship a key, or environments where a central secrets service is mandated by policy.

Migration path (recommended, lowest-risk):

  1. Inventory first. Enumerate every secret currently in config/ and .env, and classify: (a) safe to encrypt and commit, (b) must stay in a managed secret store for compliance reasons, (c) already unused. Only (a) goes through this package.
  2. Pilot on one non-critical key in a staging environment (e.g. a third-party API key for a sandbox). Encrypt, commit, deploy, verify decryption.
  3. Expand to the full class-(a) set, one PR per config file, so a bad value is trivially revertible.
  4. Codify the procedure — a short runbook and an artisan wrapper — before widening to additional applications.

Compatibility considerations:

  • APP_KEY parity across environments. Every environment (local, CI, staging, prod) must hold the same key that encrypted the values, or each must have its own encrypted set. Mixed keys are the most common integration failure. Decide the model explicitly: one key across all environments (simpler, weaker isolation) vs. per-environment ciphertext (stronger, more operational work).
  • config:cache. Confirm the package behaves correctly when config is cached in the deploy pipeline; re-encrypting values requires a cache rebuild as part of the release.
  • CI/CD secrets. The pipeline still needs APP_KEY injected at runtime — this package reduces the number of secrets in the pipeline to roughly one, which is a genuine win, but does not eliminate the need for a secure secret injection mechanism.

Sequencing: (1) Confirm version/version-matrix support and security posture → (2) pilot in staging → (3) key-management decision and runbook → (4) production rollout on one app → (5) add a CI guardrail that blocks plaintext-looking secrets in config diffs → (6) consider for the second application only after the runbook has survived one real rotation drill.

On v7.1.0 specifically: no sequencing change. Treat as a routine patch-level pickup; bundle it with the next dependency refresh rather than making a dedicated change.

Operational Impact

Maintenance: Low ongoing code maintenance — the package is thin and its surface area is small. The real maintenance burden is procedural: (a) who can run the encryption command, (b) how the runbook stays current, (c) keeping APP_KEY handling consistent as environments are added. Budget a light recurring review of upstream releases; this is a low-traffic package, so reviews are cheap but also mean long gaps between security patches.

Support and ownership: Assign a named owner (typically a platform/backend lead). Because the package concentrates credential access into one key, "who holds APP_KEY" becomes a support-critical question — it should be documented alongside on-call runbooks, not held informally. Do not let this become an unowned utility.

Scaling: Functionally negligible — decryption happens once per config resolution, and with config:cache the cost is amortized away. Scaling concerns are organizational, not computational: more applications and more environments multiply the number of ciphertext sets and the number of people who need the key, and the "one key, many apps" model degrades in isolation strength as it grows. For a large estate, this package is a reasonable fit for small/medium services and a poor fit as a fleet-wide standard.

Failure modes and mitigations:

Failure Symptom Mitigation
APP_KEY rotated or lost App fails to boot; broad 500s Key escrow in a managed store; rotation drill before production; alert on boot failures
Key mismatch between environments Works in staging, fails in prod (or vice versa) Explicit key model documented; post-deploy smoke test that reads an encrypted value
Corrupted/truncated ciphertext (bad merge) Boot exception on the affected config file One-file-per-PR rollout; CI check that encrypted values decode in a test job
Stale config:cache after re-encryption Old plaintext or old ciphertext served Cache rebuild as a mandatory deploy step
Credential leaked in git history Ciphertext exposed; plaintext exposed to key holders Rotate credential at the provider, re-encrypt, and treat git history as public-within-org
Upstream abandonment No patches for future Laravel/PHP versions Track release cadence; the thin surface area means a fork/vendored copy is viable

Supply chain: The v7.1.0 Trivy workflow improves the package's own hygiene but does nothing for your application. Mirror the intent by ensuring your own pipeline scans dependencies and container images — and note that this package protects secrets at rest in the repo, not the software supply chain around it. These are complementary, not overlapping, controls.

Ramp-up: Roughly half a day for a Laravel-fluent engineer to install, pilot, and document; near-zero for anyone already comfortable with APP_KEY semantics. The genuine learning curve is conceptual, not technical — engineers must internalize that committing ciphertext is intentional and safe only while the key stays out of the repo. Two guardrails make ramp-up safe: a CI check that rejects APP_KEY appearing in committed files, and a runbook section on what to do when decryption fails. Without those, expect at least one incident during the first key rotation.

Bottom line: v7.1.0 is a CI-only release with no consumer-facing impact and does not change the adoption calculus. The package is worth piloting where the goal is reducing env-var sprawl and letting secrets travel with the code; it should not be adopted where compliance requires a managed secret store, audited access, or automated rotation. The decision hinges almost entirely on whether the team can manage a single long-lived APP_KEY responsibly — resolve that question before writing any code.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin