返回顶部
s

security-news-feed安全新闻聚合

Automated security news aggregation and summarization module. Collects news from 11 Korean security sources (KRCERT, NCSC, Boho, Dailysec, etc.) → summarizes with Gemini API → publishes to Notion/Tistory. Runs hourly. Use when you want to monitor security news, collect Korean security updates, or aggregate news feeds. Triggers: "보안 뉴스", "security news", "뉴스 수집".

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
318
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

security-news-feed

Security News Module

概述

这是一个从11个韩国安全新闻源自动收集新闻,使用Gemini API进行摘要,然后发布到Notion和Tistory的模块。

周期:每小时自动执行

工作流程

并行爬取11个安全新闻源
├─ KRCERT(韩国互联网振兴院)
├─ NCSC(国家网络安全中心)
├─ Boho(保护国家)
├─ Dailysec
├─ KISA
├─ K-shield
├─ KrCert
├─ Notice
├─ Boho2
├─ Krcert2
└─ Ncsc2

基于关键词过滤(安全相关关键词)

Gemini API摘要(140字摘要 + 详细分析)

Notion数据库存储

Tistory博客发布(可选)

主要功能

1. 新闻收集(Collection)

11个韩国安全新闻源
URL类型
KRCERThttps://www.krcert.or.kr官方
NCSC
https://www.ncsc.go.kr | 官方 | | Boho | https://www.boho.or.kr | 官方 | | Dailysec | https://dailysecu.com | 民间 | | KISA | https://www.kisa.or.kr | 官方 | | K-shield | https://k-shield.or.kr | 官方 | | KrCert | https://krcert.or.kr | 官方 | | Notice | 内部源 | 内部 | | Boho2 | https://boho.or.kr | 官方 | | Krcert2 | https://www.krcert.or.kr | 官方 | | Ncsc2 | https://ncsc.go.kr | 官方 |

2. 关键词过滤(Filtering)

安全相关关键词: python keywords = [ 漏洞, 恶意代码, 黑客, 勒索软件, 安全, 入侵, 攻击, 加密, 认证, 防火墙, 恶意, 钓鱼, 间谍软件, 特洛伊木马, 僵尸网络 ]

3. Gemini API摘要(Summarization)

摘要结构

[140字摘要]

  • - 核心内容3行摘要

[详细分析]

  • - 背景说明
  • 主要内容
  • 启示
  • 应对方案

4. Notion发布(Notion Publishing)

  • - 自动保存:自动保存收集的新闻
  • 标签分类:基于关键词的自动标签
  • 状态管理:New → Read → Archived

5. Tistory发布(Tistory Publishing)

  • - 选择性发布:仅发布重要新闻
  • 自动格式化:Markdown → HTML转换
  • 分类管理:自动分配分类

安装方法

1. 克隆仓库

bash git clone --recursive https://github.com/rebugui/OpenClaw.git cd OpenClaw/submodules/securitynewsaggregator

2. 安装依赖

bash pip install -r requirements.txt

3. 设置环境变量

bash cp .env.example .env

修改.env文件:
bash

Gemini API


GEMINIAPIKEY=yourgeminiapi_key

Notion API(可选)

NOTIONAPIKEY=yournotionapi_key NOTIONDATABASEID=yourdatabaseid

Tistory API(可选)

TISTORYACCESSTOKEN=youraccesstoken TISTORYBLOGNAME=yourblogname

使用方法

手动执行

bash

单次执行

python securitynewsaggregator.py --once

守护模式(持续执行)

python securitynewsaggregator.py

仅收集特定源

python securitynewsaggregator.py --sources krcert,ncsc

注册调度器

注册到OpenClaw调度器以自动执行:

yaml

config.yaml


jobs:
- id: securitynewsaggregator
name: Security News Aggregator - 每1小时收集安全新闻
enabled: true
module: securitynewsaggregator.securitynewsaggregator
function: main
is_async: false
workingdir: submodules/securitynews_aggregator
trigger:
type: interval
hours: 1

配置文件

config.py

python

新闻源设置

NEWS_SOURCES = { krcert: { url: https://www.krcert.or.kr, type: rss, enabled: True }, ncsc: { url: https://www.ncsc.go.kr, type: web, enabled: True }, # ... }

关键词过滤

KEYWORDS = [ 漏洞, 恶意代码, 黑客, 勒索软件, 安全, 入侵, 攻击, 加密 ]

Gemini设置

GEMINI_MODEL = gemini-2.0-flash-exp GEMINIMAXTOKENS = 1000 GEMINI_TEMPERATURE = 0.7

Notion设置

NOTION_ENABLED = True NOTIONDATABASEID = yourdatabaseid

Tistory设置

TISTORY_ENABLED = False TISTORYBLOGNAME = yourblogname

文件结构

securitynewsaggregator/
├── securitynewsaggregator.py # 主执行文件
├── config.py # 配置文件
├── .env.example # 环境变量示例
├── requirements.txt # 依赖

├── modules/ # 功能模块
│ ├── collectors/ # 新闻收集器
│ │ ├── krcert_collector.py
│ │ ├── ncsc_collector.py
│ │ └── ...
│ ├── summarizer.py # Gemini摘要
│ ├── notion_publisher.py # Notion发布
│ └── tistory_publisher.py # Tistory发布

├── data/ # 数据存储
│ └── news_cache.json

└── logs/ # 日志
└── aggregator.log

Notion数据库设置

字段构成

  • - Title(标题)
  • Summary(140字摘要)
  • Content(详细分析)
  • Source(来源)
  • URL(原文链接)
  • Tags(多选)
  • Published(发布日期)
  • Status(选择:New, Read, Archived)

示例输出

收集的新闻

markdown

新型勒索软件攻击韩国企业

摘要:新型勒索软件变种开始针对韩国企业发起攻击...

详细分析

  • - 背景:近期勒索软件攻击不断增加...
  • 主要内容:该勒索软件...
  • 启示:企业需要加强安全防护...
  • 应对方案:定期备份、安全补丁...

标签:#勒索软件 #韩国 #企业攻击

来源:KRCERT
原文:https://www.krcert.or.kr/...

执行统计

最近执行结果(2026-03-08 11:58)

✅ 收集新闻:169条
✅ URL转换完成:137条
✅ 基于关键词过滤:处理169条
✅ Gemini摘要完成
✅ Notion存储完成

问题解决

新闻收集失败

bash

查看日志

tail -f logs/aggregator.log

测试特定源

python securitynewsaggregator.py --test krcert

Gemini API错误

bash

检查API密钥

echo $GEMINIAPIKEY

检查API配额

curl https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-exp?key=$GEMINIAPIKEY

Notion连接错误

bash

检查Notion API密钥

curl -X POST https://api.notion.com/v1/databases/{database_id}/query \ -H Authorization: Bearer {token} \ -H Notion-Version: 2022-06-28

依赖

  • - Python 3.11+
  • Gemini API
  • Notion API(可选)
  • Tistory API(可选)
  • BeautifulSoup4
  • Requests

API密钥申请

Gemini API

  1. 1. 访问 https://makersuite.google.com/app/apikey
  2. 创建API密钥
  3. 复制密钥

Notion API(可选)

  1. 1. 访问 https://www.notion.so/my-integrations
  2. 创建新集成
  3. 复制API

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 security-news-feed-1776179494 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 security-news-feed-1776179494 技能

通过命令行安装

skillhub install security-news-feed-1776179494

下载

⬇ 下载 security-news-feed v1.0.1(免费)

文件大小: 163.31 KB | 发布时间: 2026-4-15 11:54

v1.0.1 最新 2026-4-15 11:54
## Version 1.1.0 (formerly 1.0.1)

- Added skill version field to SKILL.md and updated documentation structure.
- Removed deprecated log file (logs/security_aggregator.log) and unused analysis metadata.
- Refactored and adjusted modules and configuration for improved maintainability.
- Updated dependencies in requirements.txt.
- No user-facing feature additions or removals; internal improvements and cleanup only.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部