Azure / Azure/bicep

Configure Bicep linter by environment variable

Open
#10,558 2 comments 0 reactions 0 assignees View on GitHub
devdiv enhancement story: linter
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

**Is your feature request related to a problem? Please describe.**

Currently you can configure the severity of Bicep linter rules by `bicepconfig.json`.

However when customers that have controlled pipelines for software development lifecycle they might want to enforce security related linting rules to improve security or enforce non-security rules for consistency.

Setting linter rules by environment variable is the easiest option because this is easily controlled by pipeline.

Setting these linter rules by environment variable should override any preference within `bicepconfig.json`.

**Describe the solution you'd like**

Add support for overriding the default or the current preference of Bicep linter rules by environment variable.

For example:

```bash
export BICEP_ANALYZER_RULES_SECURE_SECRETS_IN_PARAMS = 'error'
export BICEP_ANALYZER_RULES_SECURE_PARAMS_IN_NESTED_DEPLOY = 'error'
```

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named in the issue. Start by locating Bicep linter configuration and any existing environment-variable handling, then determine how rule-specific environment variables should override bicepconfig.json. Done means supported variables change rule severity and tests verify their precedence over configuration-file values.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.