{"skill":{"slug":"security-news-feed","displayName":"Security News Feed","summary":"Collects and summarizes Korean security news hourly from 11 sources using Gemini API, then publishes to Notion and optionally to Tistory blog.","description":"---\nname: security-news-feed\nversion: 1.1.0\ndescription: 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\", \"뉴스 수집\".\n---\n\n# Security News Module\n\n## 개요\n\n한국 보안 뉴스 소스 11곳에서 뉴스를 자동으로 수집하고, Gemini API로 요약한 후 Notion과 Tistory에 발행하는 모듈입니다.\n\n**주기**: 1시간마다 자동 실행\n\n## 워크플로우\n\n```\n11개 보안 뉴스 소스 병렬 크롤링\n    ├─ KRCERT (한국인터넷진흥원)\n    ├─ NCSC (국가사이버안보센터)\n    ├─ Boho (보호나라)\n    ├─ Dailysec\n    ├─ KISA\n    ├─ K-shield\n    ├─ KrCert\n    ├─ Notice\n    ├─ Boho2\n    ├─ Krcert2\n    └─ Ncsc2\n    ↓\n키워드 기반 필터링 (보안 관련 키워드)\n    ↓\nGemini API 요약 (140자 요약 + 상세 분석)\n    ↓\nNotion 데이터베이스 저장\n    ↓\nTistory 블로그 발행 (선택)\n```\n\n## 주요 기능\n\n### 1. 뉴스 수집 (Collection)\n**11개 한국 보안 뉴스 소스**:\n\n| 소스 | URL | 타입 |\n|------|-----|------|\n| KRCERT | https://www.krcert.or.kr | 공식 |\n| NCSC | https://www.ncsc.go.kr | 공식 |\n| Boho | https://www.boho.or.kr | 공식 |\n| Dailysec | https://dailysecu.com | 민간 |\n| KISA | https://www.kisa.or.kr | 공식 |\n| K-shield | https://k-shield.or.kr | 공식 |\n| KrCert | https://krcert.or.kr | 공식 |\n| Notice | 내부 소스 | 내부 |\n| Boho2 | https://boho.or.kr | 공식 |\n| Krcert2 | https://www.krcert.or.kr | 공식 |\n| Ncsc2 | https://ncsc.go.kr | 공식 |\n\n### 2. 키워드 필터링 (Filtering)\n**보안 관련 키워드**:\n```python\nkeywords = [\n    \"취약점\", \"악성코드\", \"해킹\", \"랜섬웨어\",\n    \"보안\", \"침해\", \"공격\", \"암호화\",\n    \"인증\", \"방화벽\", \"악성\", \"피싱\",\n    \"스파이웨어\", \"트로이목마\", \"봇넷\"\n]\n```\n\n### 3. Gemini API 요약 (Summarization)\n**요약 구조**:\n```\n[140자 요약]\n- 핵심 내용 3줄 요약\n\n[상세 분석]\n- 배경 설명\n- 주요 내용\n- 시사점\n- 대응 방안\n```\n\n### 4. Notion 발행 (Notion Publishing)\n- **자동 저장**: 수집된 뉴스 자동 저장\n- **태그 분류**: 키워드 기반 자동 태그\n- **상태 관리**: New → Read → Archived\n\n### 5. Tistory 발행 (Tistory Publishing)\n- **선택적 발행**: 중요 뉴스만 발행\n- **자동 포맷팅**: 마크다운 → HTML 변환\n- **카테고리 분류**: 자동 카테고리 할당\n\n## 설치 방법\n\n### 1. 저장소 클론\n```bash\ngit clone --recursive https://github.com/rebugui/OpenClaw.git\ncd OpenClaw/submodules/security_news_aggregator\n```\n\n### 2. 의존성 설치\n```bash\npip install -r requirements.txt\n```\n\n### 3. 환경 변수 설정\n```bash\ncp .env.example .env\n```\n\n`.env` 파일 수정:\n```bash\n# Gemini API\nGEMINI_API_KEY=your_gemini_api_key\n\n# Notion API (선택)\nNOTION_API_KEY=your_notion_api_key\nNOTION_DATABASE_ID=your_database_id\n\n# Tistory API (선택)\nTISTORY_ACCESS_TOKEN=your_access_token\nTISTORY_BLOG_NAME=your_blog_name\n```\n\n## 사용법\n\n### 수동 실행\n```bash\n# 1회 실행\npython security_news_aggregator.py --once\n\n# 데몬 모드 (지속 실행)\npython security_news_aggregator.py\n\n# 특정 소스만 수집\npython security_news_aggregator.py --sources krcert,ncsc\n```\n\n### 스케줄러 등록\nOpenClaw 스케줄러에 등록하여 자동 실행:\n\n```yaml\n# config.yaml\njobs:\n  - id: \"security_news_aggregator\"\n    name: \"Security News Aggregator - 매 1시간 보안 뉴스 수집\"\n    enabled: true\n    module: \"security_news_aggregator.security_news_aggregator\"\n    function: \"main\"\n    is_async: false\n    working_dir: \"submodules/security_news_aggregator\"\n    trigger:\n      type: \"interval\"\n      hours: 1\n```\n\n## 설정 파일\n\n### `config.py`\n```python\n# 뉴스 소스 설정\nNEWS_SOURCES = {\n    'krcert': {\n        'url': 'https://www.krcert.or.kr',\n        'type': 'rss',\n        'enabled': True\n    },\n    'ncsc': {\n        'url': 'https://www.ncsc.go.kr',\n        'type': 'web',\n        'enabled': True\n    },\n    # ...\n}\n\n# 키워드 필터\nKEYWORDS = [\n    \"취약점\", \"악성코드\", \"해킹\", \"랜섬웨어\",\n    \"보안\", \"침해\", \"공격\", \"암호화\"\n]\n\n# Gemini 설정\nGEMINI_MODEL = \"gemini-2.0-flash-exp\"\nGEMINI_MAX_TOKENS = 1000\nGEMINI_TEMPERATURE = 0.7\n\n# Notion 설정\nNOTION_ENABLED = True\nNOTION_DATABASE_ID = \"your_database_id\"\n\n# Tistory 설정\nTISTORY_ENABLED = False\nTISTORY_BLOG_NAME = \"your_blog_name\"\n```\n\n## 파일 구조\n\n```\nsecurity_news_aggregator/\n├── security_news_aggregator.py  # 메인 실행 파일\n├── config.py                    # 설정 파일\n├── .env.example                 # 환경 변수 예시\n├── requirements.txt             # 의존성\n│\n├── modules/                     # 기능 모듈\n│   ├── collectors/              # 뉴스 수집기\n│   │   ├── krcert_collector.py\n│   │   ├── ncsc_collector.py\n│   │   └── ...\n│   ├── summarizer.py            # Gemini 요약\n│   ├── notion_publisher.py      # Notion 발행\n│   └── tistory_publisher.py     # Tistory 발행\n│\n├── data/                        # 데이터 저장\n│   └── news_cache.json\n│\n└── logs/                        # 로그\n    └── aggregator.log\n```\n\n## Notion 데이터베이스 설정\n\n### 필드 구성\n- `Title` (제목)\n- `Summary` (140자 요약)\n- `Content` (상세 분석)\n- `Source` (출처)\n- `URL` (원문 링크)\n- `Tags` (다중 선택)\n- `Published` (발행일)\n- `Status` (선택: New, Read, Archived)\n\n## 예시 출력\n\n### 수집된 뉴스\n```markdown\n# 새로운 랜섬웨어, 한국 기업 공격\n\n**요약**: 새로운 랜섬웨어 변종이 한국 기업들을 대상으로 공격을 시작했습니다...\n\n**상세 분석**:\n- **배경**: 최근 들어 증가하는 랜섬웨어 공격...\n- **주요 내용**: 이 랜섬웨어는...\n- **시사점**: 기업들의 보안 강화 필요...\n- **대응 방안**: 정기 백업, 보안 패치...\n\n**태그**: #랜섬웨어 #한국 #기업공격\n\n**출처**: KRCERT\n**원문**: https://www.krcert.or.kr/...\n```\n\n## 실행 통계\n\n### 최근 실행 결과 (2026-03-08 11:58)\n```\n✅ 수집된 뉴스: 169개\n✅ URL 변환 완료: 137개\n✅ 키워드 기반 필터링: 169개 처리\n✅ Gemini 요약 완료\n✅ Notion 저장 완료\n```\n\n## 문제 해결\n\n### 뉴스 수집 실패\n```bash\n# 로그 확인\ntail -f logs/aggregator.log\n\n# 특정 소스 테스트\npython security_news_aggregator.py --test krcert\n```\n\n### Gemini API 오류\n```bash\n# API 키 확인\necho $GEMINI_API_KEY\n\n# API 할당량 확인\ncurl \"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-exp?key=$GEMINI_API_KEY\"\n```\n\n### Notion 연결 오류\n```bash\n# Notion API 키 확인\ncurl -X POST https://api.notion.com/v1/databases/{database_id}/query \\\n  -H \"Authorization: Bearer {token}\" \\\n  -H \"Notion-Version: 2022-06-28\"\n```\n\n## 의존성\n\n- Python 3.11+\n- Gemini API\n- Notion API (선택)\n- Tistory API (선택)\n- BeautifulSoup4\n- Requests\n\n## API 키 발급\n\n### Gemini API\n1. https://makersuite.google.com/app/apikey 접속\n2. API 키 생성\n3. 키 복사\n\n### Notion API (선택)\n1. https://www.notion.so/my-integrations 접속\n2. 새 통합 생성\n3. API 키 복사\n4. 데이터베이스에 통합 연결\n\n### Tistory API (선택)\n1. https://www.tistory.com/guide/api/register 접속\n2. 앱 등록\n3. Access Token 발급\n\n## 라이선스\n\nMIT License\n\n## 참고\n\n- **저장소**: https://github.com/rebugui/security_news_aggregator\n- **메인 저장소**: https://github.com/rebugui/OpenClaw\n","topics":["News","Notion"],"tags":{"latest":"1.0.1"},"stats":{"comments":0,"downloads":714,"installsAllTime":27,"installsCurrent":2,"stars":0,"versions":2},"createdAt":1773094399299,"updatedAt":1778491796228},"latestVersion":{"version":"1.0.1","createdAt":1773474473065,"changelog":"## Version 1.1.0 (formerly 1.0.1)\n\n- Added skill version field to SKILL.md and updated documentation structure.\n- Removed deprecated log file (logs/security_aggregator.log) and unused analysis metadata.\n- Refactored and adjusted modules and configuration for improved maintainability.\n- Updated dependencies in requirements.txt.\n- No user-facing feature additions or removals; internal improvements and cleanup only.","license":"MIT-0"},"metadata":null,"owner":{"handle":"rebugui","userId":"s175zt27th00qfbj07phqnkqtn83k9pg","displayName":"rebugui","image":"https://avatars.githubusercontent.com/u/51498462?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780089883507}}