-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
41 lines (36 loc) · 1.5 KB
/
Copy pathindex.html
File metadata and controls
41 lines (36 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dependabot, CodeQL, and Secret Scanning Demo </title>
<!-- 外部ライブラリの参照 -->
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
</head>
<body>
<h1>Dependabot, CodeQL, and Secret Scanning Demo</h1>
<p id="demo"></p>
<input type="text" id="userInput" placeholder="Enter your name">
<button onclick="greetUser()">Greet</button>
<div id="greeting"></div>
<script>
$(document).ready(function() {
var now = moment().format('MMMM Do YYYY, h:mm:ss a');
$('#demo').text('Current time: ' + now);
});
// XSS脆弱性 - ユーザー入力を直接DOMに挿入
function greetUser() {
var name = document.getElementById('userInput').value;
document.getElementById('greeting').innerHTML = 'Hello, ' + name + '!';
}
// パスワードを平文で保存
function savePassword(username, password) {
localStorage.setItem(username, password);
}
// デモ用のシークレット一覧
const PLACEHOLDER_GITHUB_TOKEN = "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";
</script>
</body>
</html>