Ccodemod

codemod/azure-security-bundle

Workflow-only bundle for Azure Pipelines and ARM security codemods

azuresecurityazure-pipelinesarmbundleworkflow-only
PublicBundle
0 executions

Run locally

npx codemod @codemod/azure-security-bundle

@codemod/azure-security-bundle

Workflow-only bundle package that runs all 17 Azure-related codemods currently discoverable for azure, using their published Codemod registry package names.

This bundle is intended for Azure Pipelines YAML and Azure Resource Manager (ARM) JSON scenarios. It mixes read-only analysis codemods with remediation transforms so teams can run a single reusable Azure security workflow.

Registry intent:

  • Package name: @codemod/azure-security-bundle
  • Scope: Codemod organization
  • Visibility: public
  • Access: pro

What It Runs

OrderStep namePackage sourceSummary
1Azure Pipelines: lock Swift deps@codemod/azure-pipelines-lock-swift-depsLocks Swift dependency resolution in Azure Pipelines workflows.
2Azure Pipelines: task parameter injection@codemod/azure-pipelines-task-param-injectionDetects or remediates unsafe task parameter injection patterns.
3Azure Pipelines: script injection audit@codemod/azure-pipelines-script-injection-auditAudits pipeline script execution for script injection risk.
4Azure Pipelines: pin external task version@codemod/azure-pipelines-pin-external-task-versionPins externally referenced task versions in pipeline definitions.
5ARM: RBAC disabled detection@codemod/arm-rbac-disabled-detectionDetects ARM resources with RBAC protections disabled.
6ARM: missing managed identity@codemod/arm-detect-missing-managed-identityFlags ARM resources that should use managed identity but do not.
7ARM: custom role owner capabilities@codemod/arm-no-custom-role-owner-capabilitiesDetects custom roles that grant owner-like capabilities.
8ARM: high-privilege role assignments@codemod/arm-detect-high-privilege-role-assignsAudits high-privilege role assignment usage.
9ARM: duplicate string literals@codemod/arm-duplicate-string-literals-s1192Detects repeated string literals that indicate ARM template duplication issues.
10ARM: public network access disabled@codemod/arm-public-network-access-disabledAudits or remediates public network access exposure.
11ARM: storage encryption disabled@codemod/arm-storage-encryption-disabledDetects storage resources with encryption disabled.
12ARM: weak TLS protocols@codemod/arm-detect-weak-tls-protocolsDetects weak TLS protocol settings in ARM resources.
13ARM: role assignment broad scope audit@codemod/arm-role-assignment-broad-scope-auditAudits role assignments applied at overly broad scopes.
14ARM: no cleartext protocols@codemod/arm-no-cleartext-protocolsDetects or remediates cleartext protocol usage.
15ARM: hardcoded apiVersion@codemod/arm-hardcoded-apiversionUpdates or flags hardcoded ARM apiVersion values.
16ARM: require client cert auth endpoints@codemod/arm-client-cert-auth-endpointsEnforces or audits client certificate authentication on endpoints.
17ARM: remove redundant dependsOn@codemod/arm-redundant-resource-dependsonRemoves redundant dependsOn declarations from ARM templates.

Workflow Behavior

The default workflow runs the 17 bundled registry codemods in this order:

  1. Azure Pipelines analysis and remediation steps.
  2. ARM and Azure security analysis steps.
  3. ARM remediation transforms.
  4. Optional AI review and cleanup.

The bundle itself does not ship a new AST transform. It is a workflow-only package that delegates to the published child packages by registry source.

Parameter

runAiCleanup

  • Type: boolean
  • Default: true
  • Purpose: runs the optional AI review and cleanup step after the bundled codemods finish.

The AI step is gated with if: params.runAiCleanup == true so campaign creation can expose a toggle.

Usage

Run the published bundle:

bash

Run the local package:

bash

Disable the AI cleanup step:

bash

Validate the package locally:

bash

Development

bash

License

MIT

Ready to contribute?

Build your own codemod and share it with the community.