A release is scheduled for Friday, but a last-minute Apex change adds a new integration, modifies a permission set, and updates several flows. The feature works in testing, so the team prepares to deploy. Then someone asks whether the change exposed a secret, broadened access, or introduced an unsafe query. I see this situation often because Salesforce development combines code, configuration, metadata, and connected services. A workable Salesforce DevSecOps process has to inspect all of those pieces together, rather than treating Apex as the entire application.
The first practical challenge is visibility. A conventional code scanner may review Apex and JavaScript but miss risks in XML metadata, permission assignments, flows, or experience components. Static application security testing, usually called SAST, examines source code without running it. It can identify patterns such as unescaped database input or unsafe calls, but its value depends on whether the scanner understands Salesforce-specific structures. When configuration is ignored, a secure-looking code review can still leave an overly broad profile or an exposed endpoint in the release.
Dependency risk creates a similar blind spot. A Salesforce project can include packages, JavaScript libraries, APIs, named credentials, and external services that change the system’s attack surface. Software composition analysis, or SCA, checks third-party components against known issues and records what a project actually uses. It does not replace testing, and a flagged component is not automatically exploitable in every environment. Still, having an inventory helps a team decide whether to upgrade, isolate, or accept a risk with a documented reason instead of guessing during a deployment.
Secrets are another recurring problem. A developer may place a token in a script, a sample data file, or a deployment variable because the quickest local test requires it. Secret scanning searches for credentials and key-like patterns before they reach a shared repository or production org. The useful control is not just detection. Teams also need a process for revoking exposed credentials, replacing them with managed references, and checking logs for misuse. For example, a harmless-looking integration test can become a serious issue if its connection string is copied into a repository used by several contractors.
Access changes deserve the same attention as code changes. Least privilege means giving a user, integration, or automated job only the permissions needed for its function. In practice, a pull request that adds a permission set should show why each new object, field, or system permission is required. Consider a support team that needs to view case history but suddenly receives export access to customer data. The deployment may pass every functional test, yet the authorization change creates unnecessary exposure. Reviewing permissions as deployable artifacts makes that change visible before release.
DevSecOps works best when security checks sit inside the delivery path, not in a separate review at the end. A continuous integration and continuous delivery pipeline can run SAST, dependency checks, secret scanning, metadata validation, and permission comparisons whenever a change is proposed. The results should be understandable: identify the affected file or component, explain the concern, and offer a reasonable fix. Teams also need sensible handling for false positives so developers do not learn to ignore every warning. A small, consistent gate is usually more useful than an enormous report nobody owns.
The teams I see making steady progress define ownership before adding tools. Developers handle code-level findings, administrators review configuration and access, and security staff help set policy and investigate exceptions. They also test the deployed result in a representative environment, because a clean repository does not prove that runtime behavior is safe. Keeping salesforce security guidance close to the delivery process can help establish shared language, but the day-to-day discipline matters more than labels. The goal is a release process that catches realistic issues early while letting teams explain and manage the risks that remain.