LEARN BUILD GROW TOGETHER
DEVELOPER LEARNING HUB
Learn. Build. Grow Together.

Practical tutorials, real-world examples and interview preparation.

.NETC#SQL SERVERANGULAR
Home /.NET /DevSecOps – Security in Software Delivery | Complete Developer Learning Guide

DevSecOps – Security in Software Delivery | Complete Developer Learning Guide

November 15, 2026 5 min read , , , , , , ,
DevSecOps – Security in Software Delivery | Complete Developer Learning Guide

DevSecOps – Security in Software Delivery

A practical developer learning guide to building security into the software lifecycle — from secrets and NuGet dependencies to SAST, DAST, container security, vulnerability management, and secure CI/CD pipelines.

.NET 10 LTSC# 14Beginner to AdvancedDeveloper focused

01. Introduction to DevSecOps

DevSecOps brings security into the everyday software delivery process. Instead of waiting for a final security review, teams continuously identify and reduce risk while planning, coding, building, testing, packaging, and releasing software.

PlanCodeBuildTestReleaseOperateContinuous security: identify • prevent • detect • respond • improve

Security is a continuous engineering responsibility, not a single stage at the end.

For a .NET team, this can mean reviewing ASP.NET Core code in pull requests, auditing NuGet packages, scanning a container image, testing a deployed API, and controlling who can approve production deployments.

Core idea: DevSecOps does not mean adding every scanner to every pipeline. It means selecting controls that reduce real risk, placing them where developers can act, and making failures understandable.

02. DevSecOps vs DevOps vs SecOps

PracticeMain focusTypical responsibility
DevOpsReliable collaboration and deliveryBuild, test, deploy, operate and improve
SecOpsSecurity operations and responseMonitor threats, investigate incidents and manage security operations
DevSecOpsSecurity integrated into deliveryBuild security checks and safe defaults into the engineering lifecycle

These practices overlap. DevSecOps does not replace a security operations team, penetration testing, governance, or incident response. It makes security part of normal product engineering.

03. The Secure Software Delivery Lifecycle

A practical delivery lifecycle includes security activities at each stage:

PlanThreat model, requirementsCodeSecret scan, SAST, reviewBuildSCA, SBOM, artifact checksPackageContainer and IaC scansTestDAST, API security testsReleaseApproval, signing, provenanceDeployLeast privilege, safe configOperateMonitoring, patching, responseImproveLessons, metrics, remediation

Controls should be layered. A pull-request scan catches a problem early; a registry scan can catch a newly disclosed vulnerability in an image already built; runtime monitoring helps detect suspicious behavior after deployment.

04. Security Principles Every Developer Should Know

  • Least privilege: give users, services, and pipeline identities only the permissions they need.
  • Defense in depth: use multiple independent controls rather than relying on one scanner or firewall.
  • Secure by default: choose safe configuration and deny access unless it is explicitly allowed.
  • Fail securely: errors must not reveal secrets or silently grant access.
  • Separation of duties: separate code contribution, production approval, and privileged administration where appropriate.
  • Continuous verification: reassess dependencies, images, configuration, and access as conditions change.

These principles apply whether the application is ASP.NET Core, Java, Node.js, Python, or another technology.

05. Threat Modeling and Risk Assessment

Threat modeling is a structured way to ask what can go wrong before implementation. Start with the system boundary, important data, entry points, trust boundaries, and actors.

ClientUntrusted inputASP.NET Core APITrust boundarySQL DatabaseSensitive recordsExternal ServiceThird-party boundaryHTTPSSQL accessAPI key / OAuth

For each flow, ask: who can send data, how is identity verified, what authorization is required, where is data stored, what happens if a dependency is compromised, and what evidence will help investigate misuse?

Use a repeatable method such as STRIDE as a brainstorming aid: spoofing, tampering, repudiation, information disclosure, denial of service, and elevation of privilege. It is a prompt, not a guarantee that every threat has been found.

06. Secrets, Credentials and Sensitive Configuration

A secret is information that grants access or proves identity: passwords, database connection strings, API keys, signing keys, certificates, OAuth client secrets, and tokens.

Configuration typeExampleHandling
Non-sensitive settingFeature flag, page sizeConfiguration file or environment-specific config
SecretDatabase password, API tokenSecret manager or workload identity where supported
Public identifierOAuth client ID, telemetry connection identifierAssess exposure and provider guidance; not every identifier is a secret

Never commit production secrets to Git, place them in Docker build arguments, write them to logs, or paste them into tickets. If a secret is exposed, revoke or rotate it; deleting the line from the latest commit does not invalidate a leaked credential.

Important: Base64 is encoding, not encryption. A value stored in a Kubernetes Secret or configuration file is not automatically safe simply because it is represented differently.

07. Secret Storage Options and When to Use Them

OptionSuitable useImportant consideration
Local .NET User SecretsDeveloper machine during local developmentNot encrypted production storage; not a team vault
Cloud secret managerProduction credentials and certificatesUse access policies, audit logs, rotation and private connectivity where appropriate
CI/CD secret storePipeline credentials needed for a jobScope to environment/repository, restrict access and mask output
Workload identity / managed identityService-to-service cloud accessPrefer short-lived identity over stored long-lived credentials
Hardware-backed key serviceHigh-value signing or encryption keysControl key operations and administrative access

For Azure-hosted ASP.NET Core applications, a managed identity can authenticate to supported services without embedding a password or client secret in application settings. Local development can use a developer identity with a separate permission set.

08. ASP.NET Core User Secrets for Local Development

User Secrets keeps local development values outside the project directory. It is a convenience for development, not a production vault.

dotnet user-secrets init

dotnet user-secrets set "ConnectionStrings:AppDb" \
  "Server=localhost;Database=Demo;Trusted_Connection=True;TrustServerCertificate=True"

dotnet user-secrets list

ASP.NET Core's default configuration system loads user secrets in the Development environment when the project is configured for it. Do not copy real production credentials into a developer's local secrets store.

09. Using a Secret Manager in Production

At runtime, the application should obtain credentials from a managed secret store or use workload identity to access the target service. The application should not need to know a long-lived administrator password.

// Example shape: configuration is supplied by a secure provider.
// Do not place the real secret value in source control.
var connectionString =
    builder.Configuration.GetConnectionString("AppDb");

if (string.IsNullOrWhiteSpace(connectionString))
{
    throw new InvalidOperationException(
        "Database connection is not configured.");
}

Keep secret retrieval permissions narrow. Separate production from test vaults, audit access, rotate credentials, and plan how applications recover when a secret is unavailable or has been rotated.

10. Secret Rotation, Revocation and Incident Response

  1. Identify the exposed credential and all systems that trust it.
  2. Revoke or rotate it at the issuing service immediately.
  3. Update the secret store and dependent applications.
  4. Verify that old credentials no longer work.
  5. Review logs for unexpected use and assess possible data access.
  6. Remove the leaked value from repository history where appropriate, while remembering that history cleanup does not replace rotation.
  7. Document the cause and add a preventive control.

Prefer overlapping key rotation where the service supports it: create a replacement, deploy consumers, verify usage, then revoke the old key. Emergency revocation may require a different sequence.

11. Secret Scanning in Repositories and Pull Requests

Secret scanning searches source code and repository history for patterns that resemble credentials. It can run locally, during pull requests, and periodically against the repository.

  • Use pre-commit checks as an early warning, not as the only control.
  • Scan pull requests and the default branch.
  • Enable provider-side secret detection and push protection where available.
  • Use allowlists sparingly and document every exception.
  • Provide a clear process for rotating a confirmed exposed credential.

A scanner can produce false positives and cannot recognize every custom token. Treat findings as a signal requiring triage, not as proof that a repository is safe when the scan is clean.

12. Dependency Security and Software Composition Analysis

Modern applications depend on packages maintained by other teams and organizations. Software Composition Analysis (SCA) inventories dependencies and checks them against vulnerability and policy data.

For .NET, inspect direct and transitive NuGet dependencies. A package you never referenced directly may still be brought into the application by another package.

dotnet list package --include-transitive

dotnet list package --vulnerable --include-transitive

dotnet restore

Use the syntax supported by the installed SDK and verify the output in CI. NuGet audit can also report known vulnerable packages during restore; configure warning/error policy intentionally rather than suppressing all audit messages.

13. Understanding CVE, CVSS and Dependency Risk

CVE identifies a publicly disclosed vulnerability. CVSS provides a standardized severity score, but a score alone does not tell you how exposed your application is.

Assessment questionWhy it matters
Is the vulnerable code reachable?An affected library may be present but the vulnerable feature may not be used.
Is the application exposed?Internet-facing endpoints and privileged services can increase impact.
Is an exploit known or active?Exploit availability can change urgency.
Is a fixed version available?Upgrade, replace, mitigate or document a temporary exception.
Does the fix introduce breaking changes?Plan regression tests and controlled rollout.

Prioritize by severity, exploitability, reachability, exposure, business impact, and available mitigations. Do not blindly upgrade production dependencies without testing.

14. NuGet Audit and Vulnerability Remediation

Keep package versions deliberate and review dependency updates regularly. A useful remediation loop is: detect, validate, prioritize, upgrade, test, deploy, and verify.

# Review dependencies
dotnet list package --outdated
dotnet list package --vulnerable --include-transitive

# Restore and build after changing package versions
dotnet restore
dotnet build --configuration Release
dotnet test --configuration Release

Pinning every package forever can preserve known vulnerabilities. Uncontrolled floating versions can make builds unpredictable. Use a managed update process, lock files where appropriate, and automated pull requests with tests.

15. SAST: Static Application Security Testing

SAST analyzes source code or compiled representations without running the application. It looks for risky patterns such as SQL injection, unsafe deserialization, weak cryptography, path traversal, and insecure configuration.

Source codeC# / Razor / configSAST engineRules + data flowFindingsLocation + severity

Run SAST on pull requests so developers can fix issues near the code change. Tune rules to the framework and language, and make findings actionable with a file, line, explanation, and remediation guidance.

16. Common SAST Findings in C# and ASP.NET Core

Risk patternSafer direction
SQL built by concatenating untrusted stringsUse parameterized queries or safe ORM APIs
Trusting client-supplied object identifiersAuthorize access to the specific resource
Returning exception details to clientsUse centralized exception handling and safe problem responses
Weak cryptographic primitivesUse platform cryptography APIs and current algorithms
Unvalidated file pathsNormalize, constrain to an allowed root and validate access
Unsafe deserializationUse safe serializers and avoid polymorphic type activation from untrusted input

Static analysis is not a substitute for code review. It may miss business-logic authorization flaws and can report code that is safe only because of context the analyzer cannot infer.

17. SAST with CodeQL or Similar Tools

CodeQL and comparable analyzers build a model of the code and query it for vulnerability patterns. Other options include IDE analyzers, compiler analyzers, and language-specific SAST platforms.

For a GitHub-hosted .NET repository, a typical workflow is to configure CodeQL for C# and run it on pull requests and the default branch. Follow the current action version and permissions guidance from the provider rather than copying an old workflow indefinitely.

Developer workflow: review the finding, understand the data flow, reproduce where practical, fix the root cause, add a regression test, and document a justified exception only when necessary.

18. DAST: Dynamic Application Security Testing

DAST tests a running application from the outside. It sends HTTP requests and analyzes responses to identify weaknesses such as missing security headers, injection behavior, exposed endpoints, and authentication or session issues.

DAST scannerHTTP test payloadsRunning APITest environmentReportObserved behaviorRequestsResponses

DAST requires a reachable environment and a safe test scope. Use a dedicated test tenant and test accounts. Avoid destructive payloads or production scans unless explicitly authorized and carefully controlled.

19. DAST with OWASP ZAP

OWASP ZAP is a widely used web application security testing proxy and scanner. A basic automated scan can be part of a test-environment pipeline, while authenticated and API-specific scans need deliberate configuration.

# Example only: run against a disposable test target.
# Pin and review the scanner image/version in your own pipeline.
docker run --rm -t ghcr.io/zaproxy/zaproxy:stable \
  zap-baseline.py -t https://test.example.invalid

The baseline scan is a starting point, not a full penetration test. Configure authentication, API definitions, context, exclusions, and scan policy. Review alerts manually and keep the target explicitly authorized.

20. SAST vs DAST vs IAST

MethodWhen it runsWhat it seesLimitation
SASTBefore executionSource/code patterns and data flowMay miss runtime configuration and business context
DASTAgainst running appExternally observable behaviorCoverage depends on reachable routes, auth and test data
IASTDuring execution with agent/instrumentationRuntime behavior plus internal execution contextRequires supported instrumentation and representative tests

These techniques complement each other. A mature program selects a combination based on architecture, risk, budget, and the team's ability to triage findings.

21. Container Security Fundamentals

A container packages an application and its runtime dependencies. It does not create a complete security boundary by itself. Container security covers the image, build process, registry, runtime configuration, host, orchestration platform, and access controls.

Runtime controls • least privilege • monitoringOrchestrator and host hardeningImage scanning and trusted base imageSecure build and dependency controlEvery layer needs an owner and a verification step.

22. Build a Safer .NET Container Image

Use a supported, patched base image; keep the final image small; separate build and runtime stages; run as a non-root user; and avoid copying source files, credentials, or development tooling into the final image.

# Example multi-stage Dockerfile for an ASP.NET Core API
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY . .
RUN dotnet publish -c Release -o /app/publish

FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
WORKDIR /app
COPY --from=build /app/publish .
USER $APP_UID
EXPOSE 8080
ENTRYPOINT ["dotnet", "MyApi.dll"]

Confirm that the selected base image supports the target architecture and application requirements. Rebuild regularly to consume patched base images, and verify the runtime user's permissions and writable directories.

23. Container Image Vulnerability Scanning

Image scanners inspect operating-system packages, language packages, and sometimes configuration for known vulnerabilities and misconfigurations.

# Example with Trivy; pin the scanner version in CI.
trivy image --severity HIGH,CRITICAL my-api:build

# Scan a Dockerfile/configuration before building
trivy config .

Scan before pushing and again in the registry or deployment workflow because new vulnerability intelligence can appear after an image was built. A finding in a base image should trigger a rebuild with a fixed base where available.

24. Container Runtime Hardening

  • Run as a non-root user and avoid privileged containers.
  • Drop Linux capabilities that the process does not need.
  • Use a read-only root filesystem when the application supports it.
  • Set CPU and memory limits to reduce resource-exhaustion risk.
  • Do not mount the container runtime socket into application containers.
  • Restrict network paths and use secrets facilities rather than image layers.
  • Use seccomp, AppArmor or SELinux profiles where supported.
  • Collect runtime logs and monitor unexpected process or network activity.

Container hardening must be tested with the real application. For example, a read-only filesystem may require a deliberate writable temporary directory for runtime data.

25. Infrastructure as Code Security

Infrastructure as Code (IaC) makes infrastructure reviewable, repeatable, and testable. It can also reproduce insecure settings at scale if misconfigurations are committed.

Scan Terraform, Bicep, ARM templates, Kubernetes manifests, and Helm charts for public storage, overly broad network rules, weak identity permissions, unencrypted services, and exposed secrets.

Run IaC scanning in pull requests before provisioning. Use policy-as-code for mandatory controls and require an explicit, reviewed exception when a legitimate architecture cannot meet a default policy.

26. Software Supply Chain and SBOM

The software supply chain includes source repositories, dependencies, build runners, workflow actions, base images, artifact registries, signing identities, and deployment systems.

A Software Bill of Materials (SBOM) is a machine-readable inventory of components in a software artifact. It helps teams answer which applications contain a package when a new vulnerability is disclosed.

ControlPurpose
SBOMInventory components and versions
Artifact signingVerify artifact origin and integrity
ProvenanceRecord how and where an artifact was built
Dependency pinningMake builds more reproducible and reviewable
Trusted build runnersReduce exposure to compromised build environments

27. CI/CD Pipeline Security

The pipeline has powerful permissions: it can read source, access packages, publish artifacts, and deploy production. Treat pipeline configuration and identities as production attack surfaces.

  • Use short-lived credentials and workload identity where possible.
  • Grant each workflow only the permissions it needs.
  • Pin third-party actions to immutable commit SHAs where practical.
  • Protect deployment environments with approvals and branch rules.
  • Separate build and deployment privileges.
  • Do not execute untrusted pull-request code with privileged secrets.
  • Protect self-hosted runners and clean workspaces between jobs.
  • Log administrative changes and review pipeline permission changes.

28. Security Gates and Vulnerability SLAs

A security gate decides whether a build or release may proceed. A gate should be based on a documented policy, not an arbitrary scanner exit code.

Finding classExample policy approach
Confirmed critical, exploitable issueBlock release until fixed or formally risk-accepted
High-risk issue on an exposed pathBlock or require security approval and short remediation window
Low severity or false positiveTrack, document rationale and reassess
New vulnerability in deployed componentTrigger impact assessment and patch process

Define severity, exploitability, exposure, remediation owner, target dates, exception expiry, and escalation. Avoid permanently suppressing a finding without review.

29. GitHub Actions Example: .NET Security Pipeline

The following is a teaching example showing where checks fit. Pin actions to reviewed immutable SHAs in production, use least-privilege permissions, and update action versions through a controlled process. Add provider-specific scanning steps and secrets according to your repository plan.

name: secure-dotnet-ci

on:
  pull_request:
  push:
    branches: [ main ]

permissions:
  contents: read

jobs:
  build-test-audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-dotnet@v4
        with:
          dotnet-version: '10.0.x'

      - name: Restore
        run: dotnet restore

      - name: Dependency vulnerability review
        run: dotnet list package --vulnerable --include-transitive

      - name: Build
        run: dotnet build --no-restore --configuration Release

      - name: Test
        run: dotnet test --no-build --configuration Release

This baseline is not a complete security pipeline: add secret scanning, SAST, IaC/container scanning, artifact generation and signing, and DAST in an authorized test environment. Configure the audit step to fail according to your vulnerability policy; do not assume every CLI command has identical exit-code behavior across SDK versions.

30. End-to-End Pipeline Architecture

Pull requestReview + branch rulesCode checksSecrets + SAST + SCABuildTest + SBOMImage checksScan + signRegistryTrusted artifactStagingDeploy + DAST + API testsApproval gatePolicy + owner reviewProductionDeploy approved artifactOperate and continuously reassessMonitoring • patching • incident response

Illustrative pipeline: the exact order and tools depend on the application's architecture and risk.

31. Azure Security Services for .NET Teams

For an Azure-hosted .NET application, security capabilities may include:

  • Microsoft Entra ID: workforce and workload identity.
  • Managed identities: passwordless access from supported Azure resources.
  • Azure Key Vault: managed secrets, keys and certificates.
  • Microsoft Defender for Cloud: cloud security posture and workload protection capabilities.
  • Microsoft Defender for DevOps: security posture visibility for supported developer workflows.
  • Azure Container Registry: private image storage with access controls and supported scanning integrations.
  • Azure Monitor / Application Insights: operational telemetry that can support detection and investigation.

Service availability, licensing, feature scope and integration options change. Validate the exact plan and region before designing a production control around a service feature.

32. Secure Authentication and Authorization in ASP.NET Core

Authentication establishes who or what is making a request. Authorization determines whether that identity may perform a particular action on a particular resource.

  • Use a trusted identity provider and validated token settings.
  • Apply authorization policies to endpoints and operations.
  • Check resource ownership and tenant boundaries on the server.
  • Use least-privilege roles and permissions.
  • Protect administrative routes and sensitive operations with stronger controls where appropriate.
  • Never trust a role, user ID, tenant ID, or price supplied only by the client.
builder.Services.AddAuthorization(options =>
{
    options.AddPolicy("CanManageOrders",
        policy => policy.RequireClaim("permission", "orders.manage"));
});

app.MapGroup("/api/orders")
   .RequireAuthorization("CanManageOrders");

Adapt the policy to your identity provider and authorization model. A claim check alone does not replace resource-level authorization or tenant isolation.

33. Secure Data Access and SQL Injection Prevention

SQL injection occurs when untrusted input changes the meaning of a SQL command. Use parameterized queries and safe ORM query composition.

// EF Core: values are parameterized by the provider.
var customer = await db.Customers
    .Where(c => c.Email == email)
    .SingleOrDefaultAsync(cancellationToken);

With Dapper or ADO.NET, pass values as parameters rather than concatenating them into SQL text. Dynamic table names, column names, and sort directions cannot usually be parameterized as values; map them through a strict allowlist.

34. Secure API Design and Input Validation

  • Validate request shape, length, ranges, and allowed values at the boundary.
  • Apply authorization to every sensitive operation, not only the UI route.
  • Use rate limits and resource quotas to reduce abuse and denial-of-service risk.
  • Return safe error responses and avoid exposing stack traces or secrets.
  • Use HTTPS and appropriate transport security configuration.
  • Define CORS narrowly; CORS is not authentication or authorization.
  • Protect file upload, export, search, and webhook endpoints with specific threat models.

Validation answers whether input is well-formed. Authorization answers whether the caller may perform the requested action. Both are required.

35. Security Testing in the Development Workflow

Developers should have fast feedback locally and deeper checks in CI. A balanced workflow might include IDE/compiler analyzers, unit tests for authorization rules, dependency audits, secret scanning, SAST in pull requests, and DAST against a test deployment.

Security tests should be repeatable. Use synthetic test data, dedicated accounts, stable environments, and clear cleanup. Never use a production customer's data as casual test input.

36. Vulnerability Management and Remediation Workflow

  1. Detect a finding through a scanner, report, researcher, or incident.
  2. Deduplicate and validate the finding.
  3. Identify affected versions, applications, environments, and data.
  4. Assess exploitability, exposure, impact, and compensating controls.
  5. Assign an owner and remediation deadline.
  6. Fix, upgrade, reconfigure, isolate, or formally accept the risk temporarily.
  7. Retest and close with evidence.
  8. Feed the lesson into tests, standards, and pipeline controls.

Track age of open critical/high findings, remediation time, recurring root causes, and exception expiry. Do not optimize for a low finding count by hiding or suppressing issues.

37. Security Monitoring and Incident Response

Preventive controls reduce risk, but they cannot guarantee that an incident will never happen. Monitor authentication failures, privilege changes, suspicious API usage, secret access, deployment changes, and unusual service behavior.

Define an incident process with detection, triage, containment, eradication, recovery, and lessons learned. Ensure logs avoid storing passwords, access tokens, connection strings, and unnecessary personal data.

38. Common DevSecOps Mistakes

  • Adding scanners but not assigning anyone to triage results.
  • Blocking every build for low-confidence findings, causing teams to bypass controls.
  • Assuming a clean SAST scan proves the application is secure.
  • Storing credentials in repository variables with broad access and no rotation plan.
  • Running DAST against production without authorization or safe limits.
  • Using a vulnerable base image because the application package list looks clean.
  • Giving CI workflows write access to everything by default.
  • Treating compliance reports as proof of security.
  • Ignoring false negatives, scanner coverage gaps, and stale vulnerability data.

39. Practical Mini Project: Secure an ASP.NET Core API

Build a small .NET 10 Web API and introduce security controls incrementally:

  1. Create a Web API with a health endpoint and a protected orders endpoint.
  2. Use User Secrets locally and a managed identity/secret manager in a hosted environment.
  3. Enable NuGet vulnerability auditing and review transitive dependencies.
  4. Add secret scanning and C# SAST to pull requests.
  5. Create a multi-stage, non-root container image.
  6. Scan the image and IaC before publishing.
  7. Deploy to a disposable staging environment and run an authenticated DAST/API security test.
  8. Generate an SBOM, publish a trusted artifact, and require approval for production.
  9. Document how a critical vulnerability or leaked credential would be handled.

Deliverables: pipeline YAML, Dockerfile, scan reports, a short threat model, dependency inventory, and a remediation record for one intentionally selected test finding.

40. Interview Questions and Answers

1. What is DevSecOps?

DevSecOps integrates security practices and automated controls into the software delivery lifecycle so teams identify and reduce risk continuously.

2. What is the difference between SAST and DAST?

SAST analyzes code without running the application; DAST tests a running application through its exposed interfaces.

3. What is SCA?

Software Composition Analysis inventories third-party and open-source dependencies and checks them for known vulnerabilities and policy issues.

4. What is a CVE?

A Common Vulnerabilities and Exposures identifier names a publicly disclosed vulnerability record.

5. What is CVSS?

Common Vulnerability Scoring System provides a standardized way to express vulnerability severity; it should be combined with contextual risk assessment.

6. Why are transitive NuGet dependencies important?

They are packages brought in by other packages and can introduce vulnerabilities even when the application did not reference them directly.

7. How should production secrets be stored?

Use a managed secret store or workload identity, restrict access, audit retrieval, and rotate credentials. Never commit them to source control.

8. Is Base64 encryption?

No. Base64 is an encoding format and does not protect confidentiality.

9. What is a container image scan?

It checks image layers and packages for known vulnerabilities and may also inspect configuration or policy violations.

10. Why run containers as non-root?

It reduces the privileges available to an attacker if the application process is compromised.

11. What is an SBOM?

A Software Bill of Materials is a machine-readable inventory of software components in an artifact.

12. What is a security gate?

A policy decision point that allows, blocks, or requires approval for a build or release based on defined risk criteria.

13. Why is CI/CD a security target?

Pipelines can access source, secrets, packages, and deployment permissions, so a compromised workflow can affect production systems.

14. Does a clean SAST scan mean the app is secure?

No. Static analysis has coverage limits and cannot prove the absence of business-logic, runtime, configuration, or architectural flaws.

15. What should happen when a secret is leaked?

Revoke or rotate it, update dependent systems, investigate use, clean repository history where appropriate, and add prevention controls.

16. How should vulnerability findings be prioritized?

Consider severity, exploitability, exposure, reachability, business impact, available fixes, and compensating controls.

17. What is the role of DAST in an API project?

It tests the running API from an external perspective, including reachable endpoints and observable security behavior.

18. How does managed identity help?

It lets supported workloads authenticate to services without storing a long-lived client secret in application configuration.

41. DevSecOps Checklist for a .NET Team

  • Threat model important data flows and trust boundaries.
  • Keep .NET runtime, SDK, NuGet packages and base images patched.
  • Keep secrets out of source, logs, Docker layers and pipeline output.
  • Use secret scanning and a documented rotation process.
  • Audit direct and transitive NuGet dependencies.
  • Run SAST and review findings in pull requests.
  • Scan IaC and container images before release.
  • Build minimal images and run as non-root.
  • Use least-privilege pipeline permissions and protected environments.
  • Test deployed APIs with authorized DAST and security tests.
  • Generate SBOMs and protect artifact integrity.
  • Define vulnerability SLAs, exceptions, monitoring and incident response.

42. Official Documentation and Further Learning

Security tooling evolves quickly. Verify current action versions, scanner capabilities, product licensing, and command syntax against official documentation before adopting them in a production pipeline.

43. Final Thought

DevSecOps is not about making developers responsible for every security specialty. It is about making secure engineering the normal way software is built and delivered. Start with high-value controls: protect secrets, understand dependencies, review code, harden images, and test the running application.

Make findings visible, actionable, and owned. Automate repetitive checks, keep humans involved in risk decisions, and continuously improve the pipeline as the application and threat landscape change.

Skills Tutorials – Learn • Build • Grow Together