PageSourceSearch

https://swallow-incubate.com/sw_wp/wp-content/themes/swinc/js/siteseal-init.js

js swallow-incubate.com collected 2026-10-02 19:08:38 UTC 1,863 bytes, 37 lines download raw bytes

1// GMO サイバー攻撃対策サイトシールのローダー(2026-07-29 設置)
2//
3// GMO が案内する公式タグは
4//   ① インライン <script> でローダーを書く
5//   ② <span oncontextmenu="return false;">
6//   ③ <img style="display: none">
7// の3つを含んでおり、そのまま貼ると CSP の script-src / script-src-attr /
8// style-src-attr に 'unsafe-inline' を戻すことになる(=脆弱性診断で再び指摘される)。
9// 機能は変えずに、この3つを外部ファイル + class へ移したものがこのファイル。
10//
11// 読み込まれる siteseal.js の挙動(2026-07-29 に実物を確認):
12//   - siteseal.gmo-cybersecurity.com/api/v1/seal?file_name=<imgのalt> を fetch
13//   - 返ってきた署名付きURL を img.src に入れ、img.style.display = "inline" で表示
14//   - a.onclick に診断プロフィールを開く処理を設定
15//   いずれも JS プロパティ経由なので CSP の style-src / script-src には抵触しない。
16//   必要な許可は script-src(gmo-cybersecurity.com) / connect-src・img-src(siteseal.…) の3つだけ。
17
18(function () {
19  'use strict';
20
21  // 右クリックによるシール画像の持ち出しを抑止(公式タグの oncontextmenu 相当)
22  document.addEventListener('DOMContentLoaded', function () {
23    var tag = document.getElementById('csi_siteseal_tag');
24    if (tag) {
25      tag.addEventListener('contextmenu', function (e) {
26        e.preventDefault();
27      });
28    }
29  });
30
31  // 公式ローダーと同じく load 後に本体を読み込む(表示を遅延させ描画をブロックしない)
32  window.addEventListener('load', function () {
33    var s = document.createElement('script');
34    s.src = 'https://gmo-cybersecurity.com/siteseal/siteseal.js';
35    document.body.appendChild(s);
36  });
37})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.