T09 · Insecure Skill Coding Practices
Warning
- Location
- scripts/send_outreach_package.sh:10
- Finding
- Hardcoded Gmail Sender Account Can Cause Unintended Account Use and Identity Disclosure<![CDATA[ ## Vulnerability Details **File Location**: `scripts/send_outreach_package.sh:10` **Mirrored Location**: `outreach-demo/scripts/send_outreach_package.sh:10` **Related Reference Locations**: `references/value-first-outreach.md:51-53`, `outreach-demo/references/value-first-outreach.md:51-53` **Vulnerability Type**: Hardcoded sender identity and insecure configuration **Risk Level**: Medium ### Vulnerable Code ```bash ACCOUNT="alex.data.assistant@gmail.com" ``` The related reference template also embeds the same personal identity: ```text Best, Alex alex.data.assistant@gmail.com ``` ### Technical Analysis The sending script initializes `ACCOUNT` with a specific Gmail address. Unless the operator supplies `--account`, this value is exported through `GOG_ACCOUNT` when `gog gmail send` is invoked. This conflicts with the documented requirement to use the configured sender identity and with the separate configurable values supported by `load_sender_config.py`. Although the address is not itself an authentication secret, hardcoding it creates an unsafe account-selection default and exposes a personal identity in a distributable package. If the local `gog` installation has authorization for that account, messages can be attributed to or routed through an account the operator did not intend to use. The reference template can separately leak the same identity into manually generated content. ### Attack Path 1. An operator configures an outreach sender through the documented environment or JSON configuration. 2. The operator invokes `send_outreach_package.sh` without the optional `--account` argument, following the documented example. 3. The script ignores the sender configuration used by the rendering scripts and retains `alex.data.assistant@gmail.com`. 4. The final command is executed with `GOG_ACCOUNT` set to the hardcoded account. 5. If that account is authorized in `gog`, the email is sent using the unintended account. If it is not authorized, ...[truncated 779 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the hardcoded Gmail address and fail closed when no sender account is configured: ```bash ACCOUNT="${OUTREACH_SENDER_EMAIL:-}" if [[ -z "$ACCOUNT" ]]; then echo "A sender account must be provided with --account or OUTREACH_SENDER_EMAIL" >&2 exit 2 fi ``` 2. Prefer a single configuration source shared by rendering and sending components. The shell script should read the same validated sender account used by `load_sender_config.py`. 3. Require an explicit `--account` value if reliable configuration sharing cannot be implemented. 4. Replace the personal signature in `value-first-outreach.md` with placeholders such as: ```text Best, {{sender_name}} {{sender_email}} ``` 5. Validate the chosen account against the approved preview manifest before sending. 6. Add automated tests that verify no personal email address is present in distributable scripts or references. ]]>
