Skip to content

Commit

Permalink
✨ Feat: CSP-XSS 정보도 댓글에 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
shlee9999 committed Nov 17, 2024
1 parent e07b387 commit 60173a4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# .github/workflows/lighthouse.yml
name: Lighthouse CI
on:
push:
Expand Down Expand Up @@ -86,7 +85,7 @@ jobs:
const score = (res) => (res >= 90 ? "🟢" : res >= 50 ? "🟠" : "🔴");
const comment = [
`⚡ Lighthouse Report`,
`# ⚡ Lighthouse Report`,
`| Category | Score |`,
`| --- | --- |`,
`| ${score(summary.performance)} Performance | ${summary.performance} |`,
Expand All @@ -106,7 +105,15 @@ jobs:
`| ${score(audits['speed-index'].score * 100)} Speed Index | ${audits['speed-index'].displayValue} |`
].join('\n');
comments += comment + '\n' + detail + '\n\n';
// CSP-XSS 정보
const securityInfo = [
`\n### Security Checks`,
`| Check | Status | Details |`,
`| --- | --- | --- |`,
`| CSP-XSS | ${audits['csp-xss'].score === 1 ? '✅' : '⚠️'} | ${audits['csp-xss'].title} |`
].join('\n');
comments += comment + '\n' + detail + '\n' + securityInfo + '\n\n';
});
core.setOutput('comments', comments);
Expand Down

0 comments on commit 60173a4

Please sign in to comment.