{"id":6209,"date":"2020-09-07T07:00:01","date_gmt":"2020-09-06T22:00:01","guid":{"rendered":"https:\/\/www.ecomottblog.com\/?p=6209"},"modified":"2021-01-13T16:05:45","modified_gmt":"2021-01-13T07:05:45","slug":"aws-lambda%e3%81%a7jvn-ipedia%e3%81%8b%e3%82%89%e8%84%86%e5%bc%b1%e6%80%a7%e6%83%85%e5%a0%b1%e3%82%92%e5%8f%96%e5%be%97%e3%81%97%e3%81%a6google-chat%e3%81%ab%e9%80%9a%e7%9f%a5","status":"publish","type":"post","link":"https:\/\/test.ecomottblog.com\/?p=6209","title":{"rendered":"AWS Lambda\u3067JVN iPedia\u304b\u3089\u8106\u5f31\u6027\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3066Google Chat\u306b\u901a\u77e5"},"content":{"rendered":"<p>\u7686\u3055\u3093\u3053\u3093\u306b\u3061\u306f\u3002<br \/>\n\u4eca\u5e74\u30672\u5e74\u76ee\u306b\u306a\u308a\u307e\u3057\u305f\u958b\u767a\u672c\u90e8\u306e\u592a\u7530\u3067\u3059\u3002\u672c\u30d6\u30ed\u30b02\u56de\u76ee\u306e\u6295\u7a3f\u3068\u306a\u308a\u307e\u3059\uff01<\/p>\n<p>\u65e9\u901f\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u30bf\u30a4\u30c8\u30eb\u901a\u308a\u3001AWS Lambda\u3092\u4f7f\u3063\u3066JVN iPedia\u304b\u3089\u8106\u5f31\u6027\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3001Google Chat\u306b\u901a\u77e5\u3059\u308b\u65b9\u6cd5\u3092\u304a\u4f1d\u3048\u3057\u3066\u3044\u3051\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<p>&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<h2>\u306f\u3058\u3081\u306b<\/h2>\n<p>\u79c1\u306f\u6628\u5e74\u672b\u306b\u696d\u52d9\u3067\u793e\u5185\u7528\u306b\u300c\u8106\u5f31\u6027\u60c5\u5831\u81ea\u52d5\u53ce\u96c6\u30c4\u30fc\u30eb\u300d\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<br \/>\n\u3053\u308c\u306f\u3001JVN iPedia\u3067\u516c\u958b\u3055\u308c\u3066\u3044\u308bAPI\u3092\u5229\u7528\u3057\u3001\u305d\u3053\u3067\u7ba1\u7406\u3055\u308c\u3066\u3044\u308b\u8106\u5f31\u6027\u60c5\u5831\u3092\u5165\u624b\u3057\u307e\u3059\u3002<\/p>\n<p>\u8106\u5f31\u6027\u3068\u306f\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306eOS\u3084\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306b\u304a\u3044\u3066\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u4e0d\u5177\u5408\u3084\u8a2d\u8a08\u4e0a\u306e\u30df\u30b9\u304c\u539f\u56e0\u3068\u306a\u3063\u3066\u767a\u751f\u3057\u305f\u60c5\u5831\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u6b20\u9665\u306e\u3053\u3068\u3092\u8a00\u3044\u307e\u3059\u3002\u8106\u5f31\u6027\u304c\u6b8b\u3055\u308c\u305f\u72b6\u614b\u3067\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u3068\u3001\u4e0d\u6b63\u30a2\u30af\u30bb\u30b9\u306b\u5229\u7528\u3055\u308c\u305f\u308a\u3001\u30a6\u30a4\u30eb\u30b9\u306b\u611f\u67d3\u3057\u305f\u308a\u3059\u308b\u5371\u967a\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u8106\u5f31\u6027\u306e\u60c5\u5831\u3092\u793e\u5185\u306e\u4eba\u9593\u306b\u901a\u77e5\u3057\u3001\u9038\u65e9\u304f\u8106\u5f31\u6027\u306b\u5bfe\u5fdc\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u76ee\u7684\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30c4\u30fc\u30eb\u306f\u3001CloudWatch Events\u3067\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u5f0f\u306b\u8a2d\u5b9a\u3057\u3001\u6bce\u65e5\u60c5\u5831\u3092\u81ea\u52d5\u3067\u53d6\u5f97\u3057chat\u306b\u6d41\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\nAmazon S3\uff08\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30b9\u30c8\u30ec\u30fc\u30b8\u30b5\u30fc\u30d3\u30b9\uff09\u306b\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3001\u307e\u305f\u8106\u5f31\u6027\u60c5\u5831\u306e\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u307e\u3068\u3081\u305f\u53ce\u96c6\u30ea\u30b9\u30c8\u3082S3\u3067\u7ba1\u7406\u3057\u3066\u304a\u308a\u3001\u30c1\u30e3\u30c3\u30c8\u30c4\u30fc\u30eb\u304b\u3089\u53ce\u96c6\u30ea\u30b9\u30c8\u3092\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u6700\u8fd1\u3001\u3053\u306e\u30c4\u30fc\u30eb\u306e\u7c21\u6613\u7248(\u624b\u52d5\u5b9f\u884c\u7248)\u3092\u4eba\u306b\u6559\u3048\u308b\u6a5f\u4f1a\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u3053\u306e\u8a18\u4e8b\u3067\u306f\u305d\u3061\u3089\u3092\u3054\u7d39\u4ecb\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u203b\u672c\u958b\u767a\u3067\u306f<a href=\"https:\/\/dev.classmethod.jp\/articles\/myjvn-api\/\">\u3053\u3061\u3089<\/a>\u306e\u8a18\u4e8b\u3092\u975e\u5e38\u306b\u53c2\u8003\u306b\u3057\u3066\u3044\u307e\u3059\uff01<\/p>\n<p>&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<h2>JVN iPedia \u3068\u306f<\/h2>\n<p>JVN iPedia\u3068\u306f\u3001JVN\u306b\u63b2\u8f09\u3055\u308c\u308b\u8106\u5f31\u6027\u5bfe\u7b56\u60c5\u5831\u306e\u307b\u304b\u3001\u56fd\u5185\u5916\u554f\u308f\u305a\u65e5\u3005\u516c\u958b\u3055\u308c\u308b\u8106\u5f31\u6027\u5bfe\u7b56\u60c5\u5831\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u3059\u3002<br \/>\nJVN\u3068\u306f\u3001\u300cJapan Vulnerability Notes\u300d\u306e\u3053\u3068\u3067\u3001\u300cJPCERT\/CC\u300d\u3068\u300cIPA\u300d\u3068\u3044\u3046\u7d44\u7e54\u304c\u5171\u540c\u3067\u904b\u55b6\u3057\u3066\u3044\u308b\u3001\u8106\u5f31\u6027\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u516c\u958b\u3057\u3066\u3044\u308b\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3053\u306eJVN iPedia\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306b\u3001Web\u3092\u901a\u3058\u3066\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u304c\u300cMyJVN API\u300d\u3067\u3059\u3002MyJVN \u304c\u63d0\u4f9b\u3059\u308bAPI\u3092\u5229\u7528\u3057\u3066\u69d8\u3005\u306a\u8106\u5f31\u6027\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u300cgetVulnOverviewList\u300d\u3068\u3044\u3046API\u306e\u307f\u4f7f\u7528\u3057\u307e\u3059\u3002<br \/>\ngetVulnOverviewList\u306f\u3001\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u6761\u4ef6\u306b\u5f53\u3066\u306f\u307e\u308b\u8106\u5f31\u6027\u5bfe\u7b56\u306e\u6982\u8981\u60c5\u5831\u30ea\u30b9\u30c8\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<br \/>\n\u88fd\u54c1\u540d\u3084\u30d9\u30f3\u30c0ID\u3001\u88fd\u54c1ID\u3001CVSS(\u6df1\u523b\u5ea6)\u3001\u66f4\u65b0\u65e5\u306e\u7bc4\u56f2\u6307\u5b9a\u306a\u3069\u69d8\u3005\u306b\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u3010HP URL\u3011\u203b2020\u5e74\u73fe\u5728<br \/>\n\u25a0 JVN iPedia<br \/>\n<a href=\"https:\/\/jvndb.jvn.jp\/\">https:\/\/jvndb.jvn.jp\/<\/a><\/p>\n<p>\u25a0 JVN<br \/>\n<a href=\"https:\/\/jvn.jp\/\">https:\/\/jvn.jp\/<\/a><\/p>\n<p>\u25a0 MyJVN API<br \/>\n<a href=\"https:\/\/jvndb.jvn.jp\/apis\/index.html\">https:\/\/jvndb.jvn.jp\/apis\/index.html<\/a><\/p>\n<p>&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<h2>\u7c21\u6613\u7248\u30c4\u30fc\u30eb\u306e\u6d41\u308c<\/h2>\n<p>\u30bf\u30a4\u30c8\u30eb\u901a\u308a\u3067\u3059\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-6222\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2020\/09\/vul-2-300x66.png\" alt=\"\" width=\"900\" height=\"198\" srcset=\"https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/vul-2-300x66.png 300w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/vul-2-768x168.png 768w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/vul-2-304x67.png 304w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/vul-2-282x62.png 282w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/vul-2.png 981w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/p>\n<p>\u30a8\u30af\u30bb\u30eb\u3067\u7c21\u5358\u306b\u4f5c\u6210\u3057\u305f\u56f3\u3067\u3059\u3002\u2191\u306e\u6d41\u308c\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u307e\u305aLambda\u95a2\u6570\u3092\u4f5c\u6210\u3057\u3001Lambda function\u306b\u30bd\u30fc\u30b9\u3092\u8a18\u8ff0\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u4eca\u56de\u306fPython\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002JVN iPedia\u3092\u53c2\u7167\u3057\u3001MyJVN API\u3092\u7528\u3044\u3066\u8106\u5f31\u6027\u60c5\u5831\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\u305d\u306e\u5f8c\u306fJSON\u5f62\u5f0f\u306b\u5909\u63db\u3057\u3066POST\u3057\u3066\u3042\u3052\u308c\u3070Google Chat\u306b\u30c7\u30fc\u30bf\u304c\u8ee2\u9001\u3055\u308c\u307e\u3059\uff01<br \/>\n\u203b\u3082\u3068\u3082\u3068Slack\u3068\u3044\u3046\u30c1\u30e3\u30c3\u30c8\u30c4\u30fc\u30eb\u306b\u901a\u77e5\u3055\u305b\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u90e8\u5185\u90fd\u5408\u3067Google Chat\u306b\u79fb\u884c\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<h2>Lambda<\/h2>\n<p>Lambda\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002\u672c\u6765\u306fCloudWatch Events\u3067\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u5f0f\uff08\u6bce\u65e5\u81ea\u52d5\u3067\u5b9f\u884c\uff09\u306a\u3069\u304c\u826f\u3044\u306e\u3067\u3057\u3087\u3046\u304c\u3001\u4eca\u56de\u306f\u624b\u52d5\u3067Lambda\u3092\u5b9f\u884c\u3055\u305b\u3066\u8106\u5f31\u6027\u60c5\u5831\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<br \/>\n\u69cb\u7bc9\u3092\u7d42\u3048\u305f\u3089\u3001Lambda function\u306bPython\u3067\u30bd\u30fc\u30b9\u3092\u5165\u529b\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u5fc5\u8981\u306a\u51e6\u7406\u306f\u5927\u304d\u304f\u5206\u3051\u30663\u3064\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>\u2460 \u30ea\u30af\u30a8\u30b9\u30c8URL\u3092\u4f5c\u6210\u3057\u3001\u8106\u5f31\u6027\u60c5\u5831\u3092\u53d6\u5f97\uff08XML\u5f62\u5f0f\uff09<\/h3>\n<p>\u4eca\u56de\u4f7f\u7528\u3059\u308bAPI\u306f\u300cgetVulnOverviewList\u300d\u306e\u307f\u3067\u3059\u3002<br \/>\n\u30ea\u30af\u30a8\u30b9\u30c8URL\u306f\u3001\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>\u30fbhttps:\/\/jvndb.jvn.jp\/myjvn?method=getVulnOverviewList&amp;feed=hnd&amp;\u30d1\u30e9\u30e1\u30bf\u540d=\u30d1\u30e9\u30e1\u30bf\u5024&amp;&#8230;<\/strong><\/p>\n<p>\u203b\u30d1\u30e9\u30e1\u30bf\u540d\u3001\u30d1\u30e9\u30e1\u30bf\u5024\u306b\u3064\u3044\u3066\u306f\u4e0b\u8a18URL\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\uff08MyJVN API\uff09<br \/>\n<a href=\"https:\/\/jvndb.jvn.jp\/apis\/getVulnOverviewList_api_hnd.html\">https:\/\/jvndb.jvn.jp\/apis\/getVulnOverviewList_api_hnd.html<\/a><\/p>\n<p>\u8a2d\u5b9a\u3057\u3066\u3044\u308b\u30bd\u30fc\u30b9\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">url = os.environ[\"URL_PATH\"] + \"?method=\" + os.environ[\"VULN_OVERVIEW_LIST_METHOD\"] + \"&amp;feed=hnd\" \\\n  + \"&amp;keyword=\" + keyword \\\n  + \"&amp;severity=\" + severity \\\n  + \"&amp;dateFirstPublishedStartY=\" + str(start.year) \\\n  + \"&amp;dateFirstPublishedStartM=\" + str(start.month) \\\n  + \"&amp;dateFirstPublishedStartD=\" + str(start.day) \\\n  + \"&amp;dateFirstPublishedEndY=\" + str(end.year) \\\n  + \"&amp;dateFirstPublishedEndM=\" + str(end.month) \\\n  + \"&amp;dateFirstPublishedEndD=\" + str(end.day) \\\n  + \"&amp;rangeDatePublished=n&amp;rangeDatePublic=n\"<\/pre>\n<p>\u30d1\u30e9\u30e1\u30bf\u540d\u307e\u3067\u306eURL\u306f\u74b0\u5883\u5909\u6570\u306b\u5b9a\u7fa9\u3057\u3066\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002\uff08URL_PATH\u3001VULN_OVERVIEW_LIST_METHOD\uff09<br \/>\nkeyword\u306b\u306f\u8106\u5f31\u6027\u60c5\u5831\u3092\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3059\u308b\u305f\u3081\u306e\u30ad\u30fc\u30ef\u30fc\u30c9\u3001severity\u306b\u306fCVSS\u3092\u5165\u529b\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u65e5\u306b\u3061\u306e\u6307\u5b9a\u7bc4\u56f2\u306f\u3001\u767a\u884c\u65e5\u958b\u59cb\uff5e\u7d42\u4e86\u3092\u9078\u629e\u3057\u3066\u304a\u308a\u3001\u5024\u306f\u81ea\u7531\u306b\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u203b\u4eca\u56de\u306f\u524d\u65e5\u306e\u307f\u306e\u6307\u5b9a\u3068\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\"># \u7279\u5b9a\u306eURL\u3092\u30aa\u30fc\u30d7\u30f3\nres = urllib.request.urlopen(url).read().decode(\"utf-8\")\n\n# XML\u6587\u5b57\u5217\u3092\u30d1\u30fc\u30b9\ndom = minidom.parseString(res)<\/pre>\n<p>\u30ea\u30af\u30a8\u30b9\u30c8URL\u3092\u7528\u3044\u3066\u3001XML\u5f62\u5f0f\u306e\u8106\u5f31\u6027\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3001\u30d1\u30fc\u30b9\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>&nbsp;<br \/>\n&nbsp;<\/p>\n<h3>\u2461 \u8106\u5f31\u6027\u60c5\u5831\u3092\u6574\u5f62\u3057\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u3059\u308b<\/h3>\n<p>\u30d1\u30fc\u30b9\u3057\u305f\u8106\u5f31\u6027\u60c5\u5831\u3092\u3001Google Chat\u901a\u77e5\u7528\u306b\u6574\u5f62\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \"># item\u30bf\u30b0\u306e\u6570(\u8106\u5f31\u6027\u60c5\u5831\u306e\u30d2\u30c3\u30c8\u6570)\u3060\u3051\u30eb\u30fc\u30d7\u3055\u305b\u3001\u5fc5\u8981\u306a\u60c5\u5831\u3092\u53d6\u5f97\nfor item in dom.getElementsByTagNameNS(os.environ[\"NS\"], \"item\"):\n  vul = {}\n\n  # URL\u30c7\u30b3\u30fc\u30c9\n  vul[\"keyword\"] = urllib.parse.unquote(keyword)\n\n  if len(item.getElementsByTagNameNS(os.environ[\"NS_SEC\"], \"identifier\")) == 1:\n    vul[\"id\"] = item.getElementsByTagNameNS(os.environ[\"NS_SEC\"], \"identifier\")[0].childNodes[0].nodeValue\n  if len(item.getElementsByTagNameNS(os.environ[\"NS\"], \"link\")) == 1:\n    vul[\"link\"] = item.getElementsByTagNameNS(os.environ[\"NS\"], \"link\")[0].childNodes[0].nodeValue\n    # \u8106\u5f31\u6027\u60c5\u5831\u304c\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u3001link\u306b\u5024\u3092\u5165\u308c\u3055\u305b\u306a\u3044\n    if vul[\"link\"] == \"https:\/\/jvndb.jvn.jp\/apis\/myjvn\":\n      vul[\"link\"] = \"\"\n  if len(item.getElementsByTagNameNS(os.environ[\"NS\"], \"title\")) == 1:\n    vul[\"title\"] = item.getElementsByTagNameNS(os.environ[\"NS\"], \"title\")[0].childNodes[0].nodeValue\n  if len(item.getElementsByTagNameNS(os.environ[\"NS\"], \"description\")) == 1:\n    vul[\"description\"] = item.getElementsByTagNameNS(os.environ[\"NS\"], \"description\")[0].childNodes[0].nodeValue\n  if len(item.getElementsByTagNameNS(os.environ[\"NS_SEC\"], \"cvss\")) == 2:\n    cvss = item.getElementsByTagNameNS(os.environ[\"NS_SEC\"], \"cvss\")[0]\n    vul[\"cvss_score\"] = cvss.getAttribute(\"score\")\n    vul[\"cvss_severity\"] = cvss.getAttribute(\"severity\")\n\n  # link\u306b\u5024\u304c\u5165\u3063\u3066\u3044\u308b\u5834\u5408\u306e\u307f\u3001\u914d\u5217\u306b\u60c5\u5831\u3092\u8ffd\u52a0\n  if vul[\"link\"]:\n    vulnerabilities.append(vul)\n<\/pre>\n<p>getElementsByTagName() \u3067\u6307\u5b9a\u3057\u305f\u30bf\u30b0\u540d\u306e\u8981\u7d20\u306e\u30ea\u30b9\u30c8\u3092\u53d6\u5f97\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u30bf\u30a4\u30c8\u30eb\u30bf\u30b0\u3084CVSS\u30bf\u30b0\u306e\u60c5\u5831\u3092\u3001\u305d\u308c\u305e\u308c\u683c\u7d0d\u3057\u3001\u6700\u5f8c\u306b\u914d\u5217\u306b\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>&nbsp;<br \/>\n&nbsp;<\/p>\n<h3>\u2462 Google Chat\u306b\u901a\u77e5<\/h3>\n<p>\u3042\u3068\u306f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092JSON\u69cb\u9020\u306b\u5909\u63db\u3057\u3001Google Chat Webhook\u306eURL\u306bPOST\u3059\u308c\u3070OK\u3067\u3059\u3002<br \/>\nWebhook\u306e\u8a2d\u5b9a\u3092\u753b\u50cf\u3092\u7528\u3044\u3066\u3054\u8aac\u660e\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n<h4>1\uff0e\u30c1\u30e3\u30c3\u30c8\u30eb\u30fc\u30e0\u306e\u4f5c\u6210<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6257\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2020\/09\/googlechat1.png\" alt=\"\" width=\"294\" height=\"208\" srcset=\"https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat1.png 294w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat1-282x200.png 282w\" sizes=\"(max-width: 294px) 100vw, 294px\" \/><\/p>\n<p>\u30eb\u30fc\u30e0\u540d\u306f\u81ea\u7531\u306b\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u3061\u3089\u3067\u306f\u300cwebhook_test\u300d\u3068\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h4>2\uff0eWebhook\u306e\u8a2d\u5b9a<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-6258\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2020\/09\/googlechat2-300x149.png\" alt=\"\" width=\"600\" height=\"298\" srcset=\"https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat2-300x149.png 300w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat2-768x382.png 768w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat2-304x151.png 304w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat2-282x140.png 282w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat2.png 886w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>\u2460\uff5e\u2462\u306e\u9806\u756a\u3067\u9078\u629e\u3057\u3001\u300cWebhook\u3092\u7ba1\u7406\u300d\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-6259\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2020\/09\/googlechat3-300x170.png\" alt=\"\" width=\"600\" height=\"340\" srcset=\"https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat3-300x170.png 300w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat3-768x435.png 768w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat3-304x172.png 304w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat3-282x160.png 282w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat3.png 886w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Webhook\u540d\u306f\u3001\u3053\u3061\u3089\u3082\u81ea\u5206\u306e\u5206\u304b\u308a\u3084\u3059\u3044\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u30a2\u30d0\u30bf\u30fc\u306eURL\u306f\u30a2\u30a4\u30b3\u30f3\u753b\u50cf\u3092\u8a2d\u5b9a\u3059\u308b\u3082\u306e\u3067\u3059\u3002\u4eca\u56de\u306f\u7701\u7565\u3057\u307e\u3059\u3002<br \/>\n\u78ba\u8a8d\u5f8c\u3001\u4fdd\u5b58\u3092\u62bc\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-6260\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2020\/09\/googlechat4-300x118.png\" alt=\"\" width=\"600\" height=\"236\" srcset=\"https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat4-300x118.png 300w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat4-768x303.png 768w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat4-304x120.png 304w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat4-282x111.png 282w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat4.png 886w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Webhook\u306eURL\u304c\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u3002\u53f3\u5074\u306e\u8d64\u4e38\u3067\u56f2\u3063\u3066\u3044\u308b\u90e8\u5206\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u30b3\u30d4\u30fc\u3067\u304d\u307e\u3059\u3002<br \/>\n\u30b3\u30d4\u30fc\u3057\u305fURL\u3092Lambda\u3067\u4f7f\u7528\u3057\u3001\u9001\u3063\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<pre class=\"lang:default decode:true \">\nrequests.post(os.environ[\"GOOGLE_CHAT_NOTIFY_URL\"], data = json.dumps({\n&nbsp; \"text\": msg,\n}), timeout=10)\n<\/pre>\n<p>msg\u306b\u6574\u5f62\u3057\u305f\u8106\u5f31\u6027\u60c5\u5831\u3092\u5165\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u5148\u7a0b\u30b3\u30d4\u30fc\u3057\u305fWebhook\u306eURL\u306f\u3001\u74b0\u5883\u5909\u6570\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002\u30ad\u30fc\u306f\u300cGOOGLE_CHAT_NOTIFY_URL\u300d\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-6261\" src=\"https:\/\/www.ecomottblog.com\/cmswp\/wp-content\/uploads\/2020\/09\/googlechat5-300x192.png\" alt=\"\" width=\"900\" height=\"576\" srcset=\"https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat5-300x192.png 300w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat5-304x194.png 304w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat5-282x180.png 282w, https:\/\/test.ecomottblog.com\/wp-content\/uploads\/2020\/09\/googlechat5.png 971w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/p>\n<p>\u7121\u4e8b\u306b\u9001\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\uff01<\/p>\n<p>&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<h2>\u3055\u3044\u3054\u306b<\/h2>\n<p>\u4eca\u307e\u3067\u306f\u62c5\u5f53\u90e8\u7f72\u304c\u624b\u52d5\u3067\u8106\u5f31\u6027\u60c5\u5831\u3092\u53ce\u96c6\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u81ea\u52d5\u5316\u3092\u56f3\u308a\u3001<br \/>\n\u696d\u52d9\u3067\u3088\u304f\u4f7f\u3046\u30c1\u30e3\u30c3\u30c8\u30c4\u30fc\u30eb\u306a\u3069\u306b\u60c5\u5831\u3092\u6d41\u3059\u3053\u3068\u306b\u3088\u308a\u3001\u4eca\u307e\u3067\u4ee5\u4e0a\u306b\u610f\u8b58\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n\u6570\u304c\u591a\u304f\u3001\u8a72\u5f53\u3059\u308b\u5bfe\u7b56\u60c5\u5831\u3092\u63a2\u3059\u306e\u3082\u5927\u5909\u3067\u3057\u305f\u304c\u3001\u691c\u7d22\u6761\u4ef6\u3092\u5909\u3048\u308b\u3053\u3068\u3067\u5bb9\u6613\u306b\u63a2\u3057\u5f53\u3066\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3001\u5229\u4fbf\u6027\u304c\u5897\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u307f\u306a\u3055\u3093\u3082\u3001\u30c4\u30fc\u30eb\u3092\u4f5c\u6210\u3057\u3066\u5229\u4fbf\u5316\u3092\u56f3\u3063\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7686\u3055\u3093\u3053\u3093\u306b\u3061\u306f\u3002 \u4eca\u5e74\u30672\u5e74\u76ee\u306b\u306a\u308a\u307e\u3057\u305f\u958b\u767a\u672c\u90e8\u306e\u592a\u7530\u3067\u3059\u3002\u672c\u30d6\u30ed\u30b02\u56de\u76ee\u306e\u6295\u7a3f\u3068\u306a\u308a\u307e\u3059\uff01 \u65e9\u901f\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u30bf\u30a4\u30c8\u30eb\u901a\u308a\u3001AWS Lambda\u3092\u4f7f\u3063\u3066JVN iPedia\u304b\u3089\u8106\u5f31\u6027\u60c5\u5831\u3092\u53d6\u5f97\u3057\u3001Google Ch [&hellip;]<\/p>\n","protected":false},"author":68,"featured_media":6212,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[],"_links":{"self":[{"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/6209"}],"collection":[{"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6209"}],"version-history":[{"count":58,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/6209\/revisions"}],"predecessor-version":[{"id":6293,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/posts\/6209\/revisions\/6293"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=\/wp\/v2\/media\/6212"}],"wp:attachment":[{"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.ecomottblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}