security: 보안 강제 시스템 구축 + 하드코딩 비밀번호 제거
보안 감사 결과 CRITICAL 2건, HIGH 5건 발견 → 수정 완료 + 자동화 구축. [보안 수정] - issue-view.js: 하드코딩 비밀번호 → crypto.getRandomValues() 랜덤 생성 - pushSubscriptionController.js: ntfy 비밀번호 → process.env.NTFY_SUB_PASSWORD - DEPLOY-GUIDE.md/PROGRESS.md/migration SQL: 평문 비밀번호 → placeholder - docker-compose.yml/.env.example: NTFY_SUB_PASSWORD 환경변수 추가 [보안 강제 시스템 - 신규] - scripts/security-scan.sh: 8개 규칙 (CRITICAL 2, HIGH 4, MEDIUM 2) 3모드(staged/all/diff), severity, .securityignore, MEDIUM 임계값 - .githooks/pre-commit: 로컬 빠른 피드백 - .githooks/pre-receive-server.sh: Gitea 서버 최종 차단 bypass 거버넌스([SECURITY-BYPASS: 사유] + 사용자 제한 + 로그) - SECURITY-CHECKLIST.md: 10개 카테고리 자동/수동 구분 - docs/SECURITY-GUIDE.md: 운영자 가이드 (워크플로우, bypass, FAQ) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
|
Before Width: | Height: | Size: 70 B After Width: | Height: | Size: 70 B |
@@ -117,6 +117,6 @@
|
||||
<script src="/static/js/utils/photo-modal.js?v=2026031401"></script>
|
||||
<script src="/static/js/utils/toast.js?v=2026031401"></script>
|
||||
<script src="/static/js/components/mobile-bottom-nav.js?v=2026031401"></script>
|
||||
<script src="/static/js/pages/issue-view.js?v=2026031401"></script>
|
||||
<script src="/static/js/pages/issue-view.js?v=2026041001"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -673,13 +673,20 @@ async function handlePasswordChange(e) {
|
||||
// 현재 비밀번호 확인 (localStorage 기반)
|
||||
let users = JSON.parse(localStorage.getItem('work-report-users') || '[]');
|
||||
|
||||
// 임시 비밀번호 생성 (클라이언트에 하드코딩하지 않음)
|
||||
function generateTempPassword() {
|
||||
const arr = new Uint8Array(12);
|
||||
crypto.getRandomValues(arr);
|
||||
return Array.from(arr, b => b.toString(36).padStart(2, '0')).join('').slice(0, 16);
|
||||
}
|
||||
|
||||
// 기본 사용자가 없으면 생성
|
||||
if (users.length === 0) {
|
||||
users = [
|
||||
{
|
||||
username: 'hyungi',
|
||||
full_name: '관리자',
|
||||
password: 'djg3-jj34-X3Q3',
|
||||
password: generateTempPassword(),
|
||||
role: 'admin'
|
||||
}
|
||||
];
|
||||
@@ -694,7 +701,7 @@ async function handlePasswordChange(e) {
|
||||
user = {
|
||||
username: username,
|
||||
full_name: username === 'hyungi' ? '관리자' : username,
|
||||
password: 'djg3-jj34-X3Q3',
|
||||
password: generateTempPassword(),
|
||||
role: username === 'hyungi' ? 'admin' : 'user'
|
||||
};
|
||||
users.push(user);
|
||||
Reference in New Issue
Block a user