[
  {
    "path": ".github/workflows/AutoRun.yml",
    "content": "# This workflow will install Python dependencies, run tests and lint with a single version of Python\n# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions\n\nname: CVE-Monitor\n\non:\n  release:\n    types: [published]\n  push:\n    tags:\n    - 'v*'\n  #currently the workflow is set to run every 10 minutes  \n  schedule:\n    - cron: '0/10 * * * *'\n  watch:\n    types: [started]\njobs:\n  build:\n\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/checkout@v2\n    - name: Set up Python 3.9\n      uses: actions/setup-python@v2\n      with:\n        python-version: 3.9\n    - name: Install dependencies\n      run: |\n        pip install requests\n        pip install PyNaCl\n        pip install lxml\n        pip install python-telegram-bot\n    \n    - name: Monitor CVE\n      env: \n         SCKEY: ${{ secrets.SCKEY }}\n         TG_CHAT_ID: ${{ secrets.TG_CHAT_ID }}\n         TG_TOKEN: ${{ secrets.TG_TOKEN }}\n         total_count: ${{ secrets.TOTAL_COUNT }}\n         option: ${{ secrets.Option }}\n         GH_TOKEN: ${{ secrets.GH_TOKEN }} \n         GH_REPO: ${{ github.repository }}\n      run: |\n        python Github-CVE-Listener.py\n"
  },
  {
    "path": "Github-CVE-Listener.py",
    "content": "#coding = utf-8\n\nimport urllib\nimport requests,re,time\nimport html\nimport json\nimport os\nfrom base64 import b64encode\nfrom nacl import encoding, public\nfrom lxml import etree\nimport telegram\nimport asyncio\nimport time\n\ngh_token=os.getenv('GH_TOKEN')\ngh_repo=os.getenv('GH_REPO')\n#The option of send method\n# 1 --> Wechat\n# 2 --> TGBot\noption=os.getenv('option')\nAuth=r'token '+gh_token\ngeturl=r'https://api.github.com/repos/'+gh_repo+r'/actions/secrets/public-key'\n\n#有道翻译API\ndef translate(text):\n    url = 'https://aidemo.youdao.com/trans'\n    try:\n        data = {\"q\": text, \"from\": \"auto\", \"to\": \"zh-CHS\"}\n        resp = requests.post(url, data)\n        if resp is not None and resp.status_code == 200:\n              respJson = json.loads(resp.text)\n              if \"translation\" in respJson:\n                   text =\"\\n\".join('' + str(i) for i in respJson[\"translation\"])\n    except:\n        print(\"[WARN] Error translating message!\")\n    return text\n\ndef getpublickey(Auth,geturl):\n    headers={'Accept': 'application/vnd.github.v3+json','Authorization': Auth}\n    html = requests.get(geturl,headers=headers)\n    jsontxt = json.loads(html.text)\n    if 'key' in jsontxt:\n        print(\"[INFO] Get public key suceeded\")\n    else:\n        print(\"[ERROR] Get public key failed :( Is secret GH_TOKEN set correctly? \")\n    public_key = jsontxt['key']\n    global key_id \n    key_id = jsontxt['key_id']\n    return public_key\n\n#encrypt secret\ndef createsecret(public_key,secret_value):\n    public_key = public.PublicKey(public_key.encode(\"utf-8\"), encoding.Base64Encoder())\n    sealed_box = public.SealedBox(public_key)\n    encrypted = sealed_box.encrypt(str(secret_value).encode(\"utf-8\"))\n    return b64encode(encrypted).decode(\"utf-8\")\n\n#upload total_count as secret\ndef setsecret(encrypted_value,key_id,puturl):\n    headers={'Accept': 'application/vnd.github.v3+json','Authorization': Auth}\n    data_str=r'{\"encrypted_value\":\"'+encrypted_value+r'\",'+r'\"key_id\":\"'+key_id+r'\"}'\n    putstatus=requests.put(puturl,headers=headers,data=data_str)\n    if putstatus.status_code >= 300:\n        print(\"[ERROR] total_count upload failed!\")\n    else:\n        print(\"[INFO] total_count upload suceeded!\")\n    return putstatus\n#get cve related repos\ndef getNews():\n    try:\n        api = \"https://api.github.com/search/repositories?q=CVE-2023&sort=updated\"\n        headers = {\n          \"Authorization\": \"Bearer \"+gh_token\n         }\n        req = requests.get(api, headers=headers).text\n        respJson = json.loads(req)\n        #print(respJson)\n        #cve_total_count=re.findall ('\"total_count\":*.{1,10}\"incomplete_results\"',req)[0][14:17]\n        cve_total_count=respJson[\"total_count\"]\n        #cve_description=re.findall ('\"description\":*.{1,200}\"fork\"',req)[0].replace(\"\\\",\\\"fork\\\"\",'').replace(\"\\\"description\\\":\\\"\",'')\n        if respJson[\"items\"][0][\"description\"]:\n           cve_description = respJson[\"items\"][0][\"description\"]\n        else:\n           cve_description = \"NULL!\"   \n        #cve_url=re.findall ('\"svn_url\":*.{1,200}\"homepage\"',req)[0].replace(\"\\\",\\\"homepage\\\"\",'').replace(\"\\\"svn_url\\\":\\\"\",'')\n        cve_url = respJson[\"items\"][0][\"svn_url\"]\n        return cve_total_count,cve_description,cve_url\n\n    except Exception as e:\n        print (\"[ERROR] \",e,\"Can not connect to github :( \")\n#check CVE_ID\ndef exist_cve(cve):\n   query_cve_url = \"https://cve.mitre.org/cgi-bin/cvename.cgi?name=\" + cve\n   github_headers = {'Authorization': Auth }\n   response = requests.get(query_cve_url, headers=github_headers, timeout=10)\n   html = etree.HTML(response.text)\n   #des = html.xpath('//*[@id=\"GeneratedTable\"]/table//tr[4]/td/text()')[0].strip()\n   if re.findall('but the record does not exist', str(html), flags=re.IGNORECASE):\n        print(\"[WARN] CVE_ID doesn't exist, skipping...\")\n        return 0\n   else:\n        return 1\n#get vuln description from CVE\ndef get_cve_des(cve):\n    try:\n        time.sleep(3)\n        query_cve_url = \"https://www.cve.org/api/?action=getCveById&cveId=\" + cve\n        print(query_cve_url)\n        github_headers = {\n        'Authorization': Auth }\n        #response = requests.get(query_cve_url, headers=github_headers, timeout=10)\n        #html = etree.HTML(response.text)\n        #des = html.xpath('//*[@id=\"GeneratedTable\"]/table//tr[4]/td/text()')[0].strip()\n        resp = requests.get(query_cve_url,headers=github_headers, timeout=10)\n        respJson = json.loads(resp.text)\n        des = respJson[\"containers\"][\"cna\"][\"descriptions\"][0][\"value\"]\n        return des\n    except Exception as e:\n        err = \"* **RESERVED** *\"\n        print(\"[WARN] Get CVE description Failed, cause CVE refused\")\n        return err\n#get cve id\ndef getid(respJson):\n    cve_name = respJson[\"items\"][0][\"name\"]\n    cve_id = re.findall('(CVE\\-\\d+\\-\\d+)', cve_name, flags=re.IGNORECASE)\n    des = respJson[\"items\"][0][\"description\"]\n    if des:\n        cve_des = re.findall('(CVE\\-\\d+\\-\\d+)', des, flags=re.IGNORECASE)\n    # if empty or have README only\n    if(int(respJson[\"items\"][0][\"size\"]) == 0):\n        print(\"[WARN] Repo is empty or only contains readme...Skipping...\")\n        exit(0)\n    readme = \"https://raw.githubusercontent.com/\" + str(respJson[\"items\"][0][\"full_name\"]) + \"/main/README.md\"\n    readme_content = requests.get(readme).text\n    if str(cve_id) == \"[]\":\n         cve_id = cve_id + re.findall('(CVE\\-\\d+\\-\\d+)', readme_content, flags=re.IGNORECASE)\n    if str(cve_id) != \"[]\":\n        if(\"cve\" in str(cve_id[0])):\n             return re.sub(\"cve\", \"CVE\", str(cve_id[0]))\n        return cve_id[0]\n    else:\n         print(\"[WARN] Get CVE ID Failed, Does the repo contain the correct info?\")\n         exit(0)\n#Send TG\nasync def TG(cve_des):\n    text = r'喵~~ Senpai! 有新的CVE更新送达!'\n    msg =\"CVE相关项目总数: \" + str(getNews()[0]) + \"\\r\\n\" +\"GitHub项目介绍: \" + getNews()[1]+ \"\\r\\n\" +\"(\"+translate(getNews()[1])+\")\"+\"\\r\\n\"+ \"链接: \" + getNews()[2] +  \"\\r\\n\" + \"该CVE编号的详情: \" + cve_des +\"\\r\\n\"+\"(\"+translate(cve_des)+\")\"+\"\\r\\n\" + \"(⁄ ⁄•⁄ω⁄•⁄ ⁄)\"\n    #msg =\"repo number: \" + str(getNews()[0]) + \"\\r\\n\" +\"GitHub description: \" + getNews()[1]+ \"\\r\\n\" + \"Link: \" + getNews()[2] +  \"\\r\\n\" + \"CVE Vulnerability Description: \" + cve_des + \"\\r\\n\" + \"(⁄ ⁄•⁄ω⁄•⁄ ⁄)\"\n    #msg = translate(msg)\n    tg_token = os.getenv('TG_TOKEN')\n    tg_chat_id = os.getenv('TG_CHAT_ID')\n    bot = telegram.Bot(token=tg_token)\n    await bot.send_message(chat_id=tg_chat_id, text=text + \"\\r\\n\" + msg)\n#Send Wechat\ndef Wechat(cve_des):\n    #The title of the message\n    text = r'喵~~ Senpai! 有新的CVE更新送达!'\n    #Process SCKEYs\n    sckey = os.getenv('SCKEY')\n    sckeys = sckey.split(\",\")\n    #The contents of the message\n    msg =\"\\n\"+\"* CVE相关项目总数: \" + str(getNews()[0]) + \"\\n\" +\"* GitHub项目介绍: \" + getNews()[1]+\"\\n\"+\"> (\"+translate(getNews()[1])+\")\"+\"\\n\"+ \"* 链接: \" + getNews()[2] +  \"\\n\" + \"* 该CVE编号的详情: \" + cve_des +\"\\n\"+\"> (\"+translate(cve_des)+\")\"+\"\\n\"+\"\\n\"+ \"(⁄ ⁄•⁄ω⁄•⁄ ⁄)\"\n    #msg = translate(msg)\n    for key in sckeys:\n        uri = 'https://sc.ftqq.com/'+ key +'.send?text={}&desp={}'.format(text, msg)\n        send = requests.get(uri)\n#Send Message\ndef sendNews(total_count):\n    try:\n        api = \"https://api.github.com/search/repositories?q=CVE-2023&sort=updated\"\n        req = requests.get(api).text\n        respJson = json.loads(req)\n        repo_name = respJson[\"items\"][0][\"name\"]\n        if int(total_count) < getNews()[0]:\n             cve_id = getid(respJson)\n             print(\"[INFO] CVE ID: \", cve_id)\n             #Description from CVE\n             if exist_cve(cve_id):\n                   cve_des = get_cve_des(cve_id)\n             else:\n                exit(0)\n             if int(option) == 1:\n                print(\"[INFO] CVE updates found! Sending Wechat!\")\n                Wechat(cve_des)\n             elif int(option) == 2:\n                print(\"[INFO] CVE updates found! Sending TG!\")\n                asyncio.run(TG(cve_des))\n             elif int(option) == 3:\n                print(\"[INFO] CVE updates found! Sending TG and Wechat!\")\n                asyncio.run(TG(cve_des))\n                Wechat(cve_des)\n             print(getNews())\n             time.sleep(5)\n             total_count = getNews()[0]\n             return total_count\n        elif int(total_count) > getNews()[0]:\n             print(\"[WARN] Some repos are deleted!\")\n             total_count = getNews()[0]\n             return total_count\n        else:\n             print(\"[INFO] No CVE updates found! Bye!\")\n             exit()\n\n\n    except Exception as e:\n        raise e\n\n\nif __name__ == '__main__':\n    total_count = os.getenv('total_count')\n    puturl=r'https://api.github.com/repos/'+gh_repo+r'/actions/secrets/TOTAL_COUNT'\n    key_id='qwq'\n    encrypted_value=createsecret(getpublickey(Auth,geturl),sendNews(total_count))\n    setsecret(encrypted_value,key_id,puturl)\n    #sendNews()\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2022 Nek0Suk1(KiraPGR)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Github-CVE-Listener\n\n![bulid](https://img.shields.io/badge/build-passing-brightgreen)\n![actions](https://img.shields.io/badge/running%20on-Github%20Actions-orange)\n\n```\n _______   ________  _________  ___   ___  __  __   _______                                                   \n/______/\\ /_______/\\/________/\\/__/\\ /__/\\/_/\\/_/\\/_______/\\                                                  \n\\::::__\\/_\\__.::._\\/\\__.::.__\\/\\::\\ \\\\  \\ \\:\\ \\:\\ \\::: _  \\ \\                                                 \n \\:\\ /____/\\ \\::\\ \\    \\::\\ \\   \\::\\/_\\ .\\ \\:\\ \\:\\ \\::(_)  \\/_                                                \n  \\:\\\\_  _\\/ _\\::\\ \\__  \\::\\ \\   \\:: ___::\\ \\:\\ \\:\\ \\::  _  \\ \\                                               \n   \\:\\_\\ \\ \\/__\\::\\__/\\  \\::\\ \\   \\: \\ \\\\::\\ \\:\\_\\:\\ \\::(_)  \\ \\                                              \n    \\_____\\/\\________\\/   \\__\\/    \\__\\/ \\::\\/\\_____\\/\\_______\\/                                              \n ______  __   __  ______       __        ________  ______  _________  ______  ___   __   ______  ______       \n/_____/\\/_/\\ /_/\\/_____/\\     /_/\\      /_______/\\/_____/\\/________/\\/_____/\\/__/\\ /__/\\/_____/\\/_____/\\      \n\\:::__\\/\\:\\ \\\\ \\ \\::::_\\/_    \\:\\ \\     \\__.::._\\/\\::::_\\/\\__.::.__\\/\\::::_\\/\\::\\_\\\\  \\ \\::::_\\/\\:::_ \\ \\     \n \\:\\ \\  _\\:\\ \\\\ \\ \\:\\/___/\\    \\:\\ \\       \\::\\ \\  \\:\\/___/\\ \\::\\ \\   \\:\\/___/\\:. `-\\  \\ \\:\\/___/\\:(_) ) )_   \n  \\:\\ \\/_/\\:\\_/.:\\ \\::___\\/_    \\:\\ \\____  _\\::\\ \\__\\_::._\\:\\ \\::\\ \\   \\::___\\/\\:. _    \\ \\::___\\/\\: __ `\\ \\  \n   \\:\\_\\ \\ \\ ..::/ /\\:\\____/\\    \\:\\/___/\\/__\\::\\__/\\ /____\\:\\ \\::\\ \\   \\:\\____/\\. \\`-\\  \\ \\:\\____/\\ \\ `\\ \\ \\ \n    \\_____\\/\\___/_(  \\_____\\/     \\_____\\/\\________\\/ \\_____\\/  \\__\\/    \\_____\\/\\__\\/ \\__\\/\\_____\\/\\_\\/ \\_\\/ \n```\n\nGet latest CVE EXP/POC from GitHub in WeChat!\n\n## Tips\n\n* The Program runs with Github Actions, no need to use your own server\n\n* [Chinese Version](https://github.com/Kira-Pgr/Github-CVE-Listener/blob/main/README_ZH.md)\n  \n  ## Usage\n\n* **preparations**\n  \n  * **GitHub**\n    \n    * fork my repo   \n      Sign up or log into your GitHub account and click the \"fork\" button on the page  \n      ![Fork](https://github.com/Kira-Pgr/Github-CVE-Listener/blob/main/Images/Fork.png)  \n      After that, a repo with the same name will show up in your account.   \n      Follow the steps below in **your repository**\n    \n    * Create a new GitHub Personal Access Token    \n        1）Go to the New Token [Page](https://github.com/settings/tokens/new)  \n        2）Set note to `GH_TOKEN` , select \"repo\"，set expiration to no expiration，click `Generate token` ，and remember to **COPY AND SAVE** your token  \n      \n      > **Attention! Once you leave the page, you won't able to see your token any more!**  \n      \n        ![Fork](https://github.com/Kira-Pgr/Github-CVE-Listener/blob/main/Images/Token.png)\n    \n    * Create a new repository secret   \n      \n      1. Go to Setting -> Secrets -> New repository secret，Create 6 secrets：`GH_TOKEN` `SCKEY`  `TOTAL_COUNT` `OPTION` `TG_CHAT_ID` `TG_TOKEN`\n         \n         > **Don't create the secrets you don't need**\n      \n      2. Update the values  \n         \n         The value of `OPTION`: `1` for pushing to WeChat, `2` for using Telegram bot,  `3` for using all of them    \n         The value of  `GH_TOKEN`: Your GitHub Personal Access Token  \n         The value of  `TOTAL_COUNT`: 0     \n         \n         * If you want to sent message to WeChat      \n           The value of  `SCKEY`: Your SendKey   \n           \n           > If you are using multiple SendKeys, please include them all in the value of the secret,separated by commas and without any line breaks or leading/trailing commas.\n           > \n           > For example:\n           > \n           > ```\n           > key1,key2,key3,...\n           > ```\n         \n         * If you want to sent message to Telegram     \n           The value of `TG_CHAT_ID`: Your ID or the group's ID    \n           The value of `TG_TOKEN`: The bot's token\n      \n      > **No spaces or line breaks is allowed at either the start or the end**  \n      \n        ![Secret](https://github.com/Kira-Pgr/Github-CVE-Listener/blob/main/Images/Secret.png)\n      \n      * **WeChat ”Server-Chan“**\n    \n    * [Log in](https://sct.ftqq.com/login)\n      \n      > Notice: If the QR Code doesn't load, try to open the image in a new tab\n      > ![image](https://github.com/Kira-Pgr/Github-CVE-Listener/blob/main/Images/Login.png)\n    \n    * Copy your [SendKey](https://sct.ftqq.com/sendkey) for later use\n      ![SendKey](https://github.com/Kira-Pgr/Github-CVE-Listener/blob/main/Images/SendKey.png)\n      \n      * **Telegram Bot**   \n    \n    * [Get Your ID](https://telegram.me/myidbot)    \n    \n    * [Get Your Token](https://telegram.me/BotFather)    \n\n* **Run the program**\n  \n  * Go to the Action Tab，Click the green button（I understand my workflow...) in the middle\n    ![image](https://user-images.githubusercontent.com/36188023/207883085-f9345925-734a-48db-a7c6-693b0eabd7b8.png)\n  \n  * After refreshing the page，you'll see a workflow called `CVE-Monitor`.\n  \n  * Select the `CVE-Monitor` workflow，You'll see a notice（this schedule was disabled......）\n    ![image](https://user-images.githubusercontent.com/36188023/207883473-e1b6a053-54b5-4c4e-85f7-fef549672cd0.png)\n  \n  * Press `enable workflow` button\n    \n    > （If you didn't experience the problem, just ignore what I've just said = = ）  \n  \n  * Click star twice to start the workflow\n  \n  * Go to Action tab -> `CVE-Monitor` workflow -> `build` -> `Monitor CVE` You'll see the logs of each workflow run, just check if there're any errors\n  \n  * Normally, you'll receive a message now\n  \n  * Last，if the program functioned correctly, secret `TOTAL_COUNT` should be updated \n\n## Other info\n\n* The workflow is currently configured to run every 10 minutes，if you want to change that，go to [AutoRun.yml](https://github.com/Kira-Pgr/Github-CVE-Listener/blob/main/.github/workflows/AutoRun.yml), be sure to read the [GitHub Docs](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events).\n  \n  > **Attention! Actions schedules run at most every 5 minutes.**\n\n* Tip: GitHub will tell you the meaning of the schedule expression while you are changing it\n  ![image](https://github.com/Kira-Pgr/Github-CVE-Listener/blob/main/Images/schedule.png)  \n\nref:   \n*https://github.com/kiang70/Github-Monitor/*  \n*https://github.com/Hostage-02/AutoApi*\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=Kira-Pgr/Github-CVE-Listener&type=Date)](https://star-history.com/#Kira-Pgr/Github-CVE-Listener&Date)\n"
  },
  {
    "path": "README_ZH.md",
    "content": "# Github-CVE-Listener\n\n推送GitHub最新CVE EXP/POC到微信或者TG  \n\n![](https://ondemand.bannerbear.com/signedurl/9K5qxXae32jEAGRDkj/image.jpg?modifications=W3sibmFtZSI6InJlcG8iLCJ0ZXh0IjoiS2lyYS1QZ3IgLyAqR2l0aHViLUNWRS1MaXN0ZW5lcioifSx7Im5hbWUiOiJkZXNjIiwidGV4dCI6IuaXoOmcgOacjeWKoeWZqOeahEdpdEh1YuWunuaXtua8j-a0nuWIqeeUqOW3peWFt-ebkeWQrOWZqO-8jOebruWJjeaUr-aMgeW-ruS_oS9UR-aOqOmAge-8jOS4reaWh-eJiChodHRwczovL2dpdGh1Yi5jb20vS2lyYS1QZ3IvR2l0aHViLUNWRS1MaXN0ZW5lci9ibG9iL21haW4vUkVBRE1FX1pILm1kKSJ9LHsibmFtZSI6ImF2YXRhcjUiLCJoaWRlIjp0cnVlfSx7Im5hbWUiOiJhdmF0YXI0IiwiaGlkZSI6dHJ1ZX0seyJuYW1lIjoiYXZhdGFyMyIsImhpZGUiOnRydWV9LHsibmFtZSI6ImF2YXRhcjIiLCJoaWRlIjp0cnVlfSx7Im5hbWUiOiJhdmF0YXIxIiwiaW1hZ2VfdXJsIjoiaHR0cHM6Ly9hdmF0YXJzLmdpdGh1YnVzZXJjb250ZW50LmNvbS91LzM2MTg4MDIzP3Y9NCJ9LHsibmFtZSI6ImNvbnRyaWJ1dG9ycyIsInRleHQiOiJLaXJhLVBnciJ9LHsibmFtZSI6InN0YXJzIiwidGV4dCI6IjI4In1d&s=8a38774f2cd0d8e1e22ff344bf3bf76cfd944d342b62be8ea3f2a68ae6b34d4e)\n\n## 说明\n\n* 使用Github Actions运行，无需拥有服务器\n* 懒得自己搭的可以加入[TG频道](https://t.me/nanosec47)\n* [英文版README](https://github.com/Kira-Pgr/Github-CVE-Listener/blob/main/README.md)\n  \n  ## 使用步骤\n\n* **准备**\n  \n  * **GitHub方面的准备**\n    \n    * fork本项目  \n      登陆/新建github账号，回到本项目页面，点击右上角fork本项目的代码，  \n      ![Fork](https://github.com/Kira-Pgr/Github-CVE-Listener/blob/main/Images/Fork.png)  \n      然后你账号下会出现一个一模一样的项目，接下来的操作均在你的这个项目下进行。\n    \n    * 新建github密钥    \n        1）进入创建新Token[页面](https://github.com/settings/tokens/new)  \n        2）设置名字为 `GH_TOKEN` , 然后勾选repo，过期时间选择永不过期，点击 `Generate token` ，最后**复制保存**生成的github密钥  \n      \n      > **注意！一旦离开页面下次就看不到了！**  \n      \n        ![Fork](https://github.com/Kira-Pgr/Github-CVE-Listener/blob/main/Images/Token.png)\n    \n    * 新建secret    \n      \n      1. 依次点击页面上栏右边的 Setting -> 左栏 Secrets -> 右上 New repository secret，新建6个secret：`GH_TOKEN` `SCKEY`  `TOTAL_COUNT` `OPTION` `TG_CHAT_ID` `TG_TOKEN`\n      \n         > ** 注意：不需要用到的Secret项值可以不建 **     \n      \n      2. 填写每个Secret的值       \n         \n         `OPTION`填写1或2或3(1表示微信推送，2表示TG Bot推送, 3表示都推送--以满足一些特殊情况)\n         \n          `GH_TOKEN`填写你获得的GitHub密钥         \n         \n          `TOTAL_COUNT`填0     \n         \n         * 如推送微信 \n            `SCKEY`填写你的SendKey(获取方式见下文)     \n           \n           > 如果你同时使用多个SendKey,请把它们都写在这个Secret的值中(用逗号间隔,不需要换行,开头和最后也不要加逗号)  \n           > \n           > 像这样`key1,key2,key3,...`\n         \n         * 如推送TG Bot   \n           `TG_CHAT_ID`填你或者你所在群的ID   \n           `TG_CHAT_ID`填你Bot的Token(获取方式均见下文)    \n         > **注意！填入内容注意前后不要有空格空行**   \n         \n         ![Secret](https://github.com/Kira-Pgr/Github-CVE-Listener/blob/main/Images/Secret.png)\n    \n    * **微信Server酱**\n    \n    * [登陆Server酱](https://sct.ftqq.com/login)\n      \n      > PS:如果进入登陆界面后二维码无法显示，把二维码图片在新标签页打开即可\n      > ![登陆界面](https://github.com/Kira-Pgr/Github-CVE-Listener/blob/main/Images/Login.png)\n    \n    * 复制你的[SendKey](https://sct.ftqq.com/sendkey)备用\n      ![SendKey](https://github.com/Kira-Pgr/Github-CVE-Listener/blob/main/Images/SendKey.png)\n    \n    * **TG Bot方面**\n    \n    * [获取ID](https://telegram.me/myidbot)    \n    \n    * [获取Token](https://telegram.me/BotFather)    \n\n* **运行**\n  \n  * 点击上栏中间的Action进入运行日志页面，中间应该有个绿色按钮（I understand my workflow...），点击。\n    ![image](https://user-images.githubusercontent.com/36188023/207884213-22fc13db-e420-40ab-a30d-d3ba404fa918.png)\n  \n  * 自动刷新后，会看到左边有一个叫`CVE-Monitor`的流程\n  \n  * 点进去，然后会看到有个黄条（this schedule was disabled......）\n    ![image](https://user-images.githubusercontent.com/36188023/207884253-dfcff51f-3936-4cf4-9fe1-a385951ad417.png)\n  \n  * 点击 enable workflow 按钮\n    \n    > （并不是很确定是否都需要进行以上4个步骤，如果你没有出现这种情况，直接忽略掉好啦 = = ）  \n  \n  * 点击两次右上角的星星（star，在fork按钮的旁边）启动action\n  \n  * 再点击上面的Action选择`CVE-Monitor`流程 -> `build` -> `Monitor CVE` 就能看到每次的运行日志,看看有没有报错\n  \n  * 没有报错的话微信里应该就会有推送了\n  \n  * 最后，再检查一下Secrets页面，应该能看到`TOTAL_COUNT`那一栏显示刚刚更新了\n\n## 补充\n\n* 程序默认是每10分钟监测一下GitHub上有没有和CVE相关的repo更新，如果你想修改，可以在[AutoRun.yml](https://github.com/Kira-Pgr/Github-CVE-Listener/blob/main/.github/workflows/AutoRun.yml)中依照[文档](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events)修改\n  \n  > **注意! 两次监测间隔时间不得小于5分钟**\n\n* Tip: 在修改时，贴心的GitHub会提示间隔的时间  \n  ![image](https://github.com/Kira-Pgr/Github-CVE-Listener/blob/main/Images/schedule.png)  \n\n* 如果遇到什么问题或者有什么建议，欢迎在Issues中提出\n\n参考:   \n*https://github.com/kiang70/Github-Monitor/*  \n*https://github.com/Hostage-02/AutoApi*\n"
  }
]