-
Notifications
You must be signed in to change notification settings - Fork 103
Description
Secret name: Packagist Composer Credentials (packagist_uut_), Packagist API Keys (packagist_ack_), and Packagist API Secrets (packagist_acs_)
-
Risk in exposing the secret:
Unauthorized access to Packagist credentials can allow attackers to authenticate to Private Packagist, download private PHP packages, modify dependency sources, or obtain sensitive code. Exposed API keys or secrets may also provide the ability to interact with authenticated Packagist API endpoints, potentially enabling metadata manipulation or unauthorized read/write operations. -
Validation method, if any:
- Tokens can be verified by making a harmless authenticated request to Packagist—for example, querying the
/packages.jsonendpoint. - When detecting credentials inside
auth.json, validation can ensure the hostname matchesrepo.packagist.comand that the associated fields follow the expected structure, even if no live verification is performed.
- Tokens can be verified by making a harmless authenticated request to Packagist—for example, querying the
-
Resources:
1. Packagist API Key
packagist_ack_[0-9a-f]{40,120}
2. Packagist API Secret
packagist_acs_[0-9a-f]{40,200}
3. Packagist auth.json extractor
Composer stores credentials in $COMPOSER_HOME/auth.json, so an extractor can detect them directly from that structure. Example:
{
"http-basic": {
"repo.packagist.com": {
"username": "<username>",
"password": "packagist_uut_<>"
}
}
}
Would this be considered a separate PRP? Could you clarify how rewards apply in cases like this?
Thanks.