Guideline Publisher
Overview
Automated system to collect security guidelines from Korean security organizations (KISA, Boho) and publish them to Notion. Unlike regular security news, guidelines are published directly without LLM processing.
Supported Sources
KISA (한국인터넷진흥원):
- - Security guidelines and best practices
- Configuration guides
- Policy documents
- URL: https://인터넷진흥원.한국/2060207
Boho (보호나라/KRCERT):
- - Security vulnerability guides
- Incident response guides
- Technical guidelines
- URL: https://www.boho.or.kr
- Includes PDF downloads
Workflow
1. Collect Guidelines
CODEBLOCK0
This will:
- - Run KISA crawler (10 guidelines)
- Run Boho crawler (11 guidelines, PDF downloads)
- Collect PDF files to temp_downloads/ directory
- Store articles in processing queue
2. Publish to Notion
CODEBLOCK1
This will:
- - Publish collected guidelines to Notion GUIDEDATABASEID
- Upload PDF files to Notion
- No LLM processing (direct publishing)
- Skip duplicates automatically
3. Full Pipeline
CODEBLOCK2
Runs both collection and publishing in sequence.
Notion Database Configuration
Guidelines are published to a separate Notion database:
GUIDEDATABASEID: Set in .env as INLINECODE1
If not set, defaults to INLINECODE2
Notion Properties:
- - Title: Guideline name
- Category: "KISA 가이드라인" or "보호나라 가이드라인"
- URL: Original source URL
- Date: Publication date
- Files: PDF attachments (Boho only)
Key Differences from Security News
Guidelines:
- - ✅ Direct publishing (no LLM processing)
- ✅ PDF file uploads
- ✅ Separate Notion database
- ✅ KISA + Boho sources
Security News:
- - ✅ LLM summary + analysis
- ✅ Mermaid diagrams
- ✅ Main Notion database
- ✅ 9 sources (KRCERT, 데일리시큐, etc.)
Environment Variables
Required in ~/.openclaw/workspace/.env:
CODEBLOCK3
File Structure
CODEBLOCK4
PDF Downloads
Boho crawler automatically downloads PDF files:
CODEBLOCK5
PDFs are uploaded to Notion as file blocks.
Troubleshooting
No guidelines collected:
- - Check KISA/Boho websites are accessible
- Verify Notion API key and database ID
- Check network connectivity
PDF upload fails:
- - Verify Notion API supports file uploads
- Check file size limits (20MB max)
- Ensure temp_downloads/ directory exists
Duplicate guidelines:
- - Notion Duplicate_check() prevents duplicates
- Based on URL matching
- Safe to run multiple times
Integration with Security News Module
This skill is integrated into the Security News Module:
CODEBLOCK6
Cron Scheduling
For automated hourly runs:
CODEBLOCK7
Resources
scripts/
- -
publish_guidelines.py - Main script for guideline collection and publishing
references/
- -
schema.md - Notion database schema for guidelines - INLINECODE6 - Example guideline publications
指南发布器
概述
自动化系统,用于从韩国安全机构(KISA、Boho)收集安全指南并发布到Notion。与常规安全新闻不同,指南直接发布,无需LLM处理。
支持的来源
KISA(韩国互联网振兴院):
- - 安全指南和最佳实践
- 配置指南
- 政策文档
- 网址:https://인터넷진흥원.한국/2060207
Boho(保护韩国/KRCERT):
- - 安全漏洞指南
- 事件响应指南
- 技术指南
- 网址:https://www.boho.or.kr
- 包含PDF下载
工作流程
1. 收集指南
bash
cd ~/.openclaw/workspace/skills/security-news-module
python3 scripts/publish_guidelines.py --collect
此操作将:
- - 运行KISA爬虫(10条指南)
- 运行Boho爬虫(11条指南,PDF下载)
- 将PDF文件收集到temp_downloads/目录
- 将文章存入处理队列
2. 发布到Notion
bash
python3 scripts/publish_guidelines.py --publish
此操作将:
- - 将收集的指南发布到Notion GUIDEDATABASEID
- 将PDF文件上传到Notion
- 无需LLM处理(直接发布)
- 自动跳过重复项
3. 完整流程
bash
python3 scripts/publish_guidelines.py --full
依次执行收集和发布操作。
Notion数据库配置
指南发布到独立的Notion数据库:
GUIDEDATABASEID:在.env中设置为SECURITYGUIDEDATABASE_ID
如果未设置,默认使用SECURITYNEWSDATABASE_ID
Notion属性:
- - 标题:指南名称
- 分类:KISA 가이드라인 或 보호나라 가이드라인
- 网址:原始来源URL
- 日期:发布日期
- 文件:PDF附件(仅Boho)
与安全新闻的主要区别
指南:
- - ✅ 直接发布(无需LLM处理)
- ✅ PDF文件上传
- ✅ 独立的Notion数据库
- ✅ KISA + Boho来源
安全新闻:
- - ✅ LLM摘要+分析
- ✅ Mermaid图表
- ✅ 主Notion数据库
- ✅ 9个来源(KRCERT、데일리시큐等)
环境变量
需要在~/.openclaw/workspace/.env中设置:
bash
Notion
NOTION
APIKEY=ntn_xxx
SECURITY
NEWSDATABASE_ID=xxx
SECURITY
GUIDEDATABASE
ID=xxx # 可选,默认使用SECURITYNEWS
DATABASEID
GLM API(仅用于安全新闻)
SECURITY
NEWSGLM
APIKEY=xxx
文件结构
security-news-module/
├── modules/
│ ├── crawlers/
│ │ ├── kisa.py (KISA指南)
│ │ └── boho.py (Boho指南 + PDF)
│ ├── publisher_service.py
│ └── notion_handler.py (PDF上传支持)
└── scripts/
└── publish_guidelines.py (本技能的脚本)
PDF下载
Boho爬虫自动下载PDF文件:
tempdownloadsboho/
├── 가이드라인1.pdf
├── 가이드라인2.pdf
└── ...
PDF作为文件块上传到Notion。
故障排除
未收集到指南:
- - 检查KISA/Boho网站是否可访问
- 验证Notion API密钥和数据库ID
- 检查网络连接
PDF上传失败:
- - 验证Notion API是否支持文件上传
- 检查文件大小限制(最大20MB)
- 确保temp_downloads/目录存在
重复指南:
- - Notion的Duplicate_check()可防止重复
- 基于URL匹配
- 可安全多次运行
与安全新闻模块的集成
本技能已集成到安全新闻模块中:
bash
同时运行指南和新闻
python3 security
newsaggregator.py --once
指南先运行(无需LLM,速度快)
然后运行安全新闻(需LLM,速度较慢)
Cron定时任务
用于自动每小时运行:
bash
已在LaunchAgent中配置
com.openclaw.security-news.plist
每小时自动运行
资源
scripts/
- - publish_guidelines.py - 指南收集和发布的主脚本
references/
- - schema.md - 指南的Notion数据库模式
- examples.md - 指南发布示例