← PHP / Laravel 목차

PHP-083 / 기초

소스에 하드코딩된 비밀번호/API 키

A07:2021 Identification and Authentication Failures · CWE-798 Hard-coded Credentials

왜 문제가 될까요?

저장소 접근자가 모두 운영 자격증명을 얻는다.

이렇게 수정하세요

php
$client = new Stripe(['key' => config('services.stripe.secret')]);   // .env

더 읽기