hardis:project:clean:sensitive-metadatas
Description
Sensitive data like credentials and certificates are not supposed to be stored in Git, to avoid security breaches.
This command detects the related metadata and replaces their sensitive content by "HIDDEN_BY_SFDX_HARDIS"
Can be automated at each hardis:work:save if sensitiveMetadatas is added in .sfdx-hardis.yml autoCleanTypes property
Example in config/.sfdx-hardis.yml:
autoCleanTypes:
- destructivechanges
- sensitiveMetadatas
Agent Mode
Supports non-interactive execution with --agent:
sf hardis:project:clean:sensitive-metadatas --agent
In agent mode, all interactive prompts are skipped and default values are used.
Parameters
| Name | Type | Description | Default | Required | Options |
|---|---|---|---|---|---|
| agent | boolean | Run in non-interactive mode for agents and automation | |||
| debug -d |
boolean | Activate debug mode (more logs) | |||
| flags-dir | option | undefined | |||
| folder -f |
option | Root folder | force-app | ||
| json | boolean | Format output as json. | |||
| skipauth | boolean | Skip authentication check when a default username is required | |||
| websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration |
Examples
$ sf hardis:project:clean:sensitive-metadatas
$ sf hardis:project:clean:sensitive-metadatas --agent