T09 · Insecure Skill Coding Practices
- Location
config.yaml:10- Finding
Plaintext SSH Credentials for a Privileged Root Account
- Content
View full analysis
Vulnerability Details
File Location:
config.yaml, lines 10–15
Vulnerability Type: Plaintext credential storage and excessive privilege
Risk Level: HighVulnerable configuration:
yaml connections: default-server: host: hostname port: 22 username: root password: passwordTechnical Analysis
The SSH connection configuration includes a password directly in a versionable YAML file and associates it with the privileged
rootaccount. Although the values appear to be placeholders, the schema encourages users to replace them in place with operational credentials. This conflicts with the security guidance elsewhere in the project, which recommends environment variables, key references, or external secret-management systems.Any user, process, backup system, source-control service, or Agent with read access to the project directory could obtain the configured credential. Use of the root account also violates least privilege: successful credential compromise would provide administrative access rather than access limited to log inspection.
Attack Path
- An operator replaces the placeholder host and password with working production values.
- The configuration is retained in the project directory, committed to source control, copied into a backup, or exposed to another local process.
- An attacker or unauthorized user reads
config.yamland extracts the root SSH username and password. - The attacker connects to the configured SSH host on port 22.
- If authentication succeeds, the attacker obtains root-level control over the remote server.
Impact Assessment
Successful exploitation could provide full administrative privileges on the configured remote host. The attacker could read or modify arbitrary files, extract additional credentials, access service and customer data, alter logs, stop or reconfigure services, install persistence, and potentially pivot to syst ...[truncated 245 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the
passwordfield from the tracked configuration. - Use an explicit secret reference such as
auth.password_env, a protected SSH key reference, or an external secrets manager. - Configure validation that rejects inline passwords, private keys, tokens, and other secret material.
- Replace direct root authentication with a dedicated, unprivileged log-analysis account.
- Grant that account read access only to the required logs and narrowly scoped commands.
- Disable SSH root login and password authentication where operationally feasible.
- Protect SSH keys with restrictive filesystem permissions and, where possible, passphrases.
- Add secret scanning to pre-commit and CI workflows.
- If real credentials were ever stored in this file or its history, rotate them and remove them from repository history and backups where feasible.
- Remove the
