diff --git a/.gemini/config.yaml b/.gemini/config.yaml new file mode 100644 index 0000000..919f6da --- /dev/null +++ b/.gemini/config.yaml @@ -0,0 +1,3 @@ +code_review: + ignore_patterns: + - ".github/suspiciousSites.md" diff --git a/.github/pxt-hardware-programming-docs-blog.md b/.github/pxt-hardware-programming-docs-blog.md deleted file mode 100644 index c05e9f9..0000000 --- a/.github/pxt-hardware-programming-docs-blog.md +++ /dev/null @@ -1 +0,0 @@ -[Pxt Hardware Programming Docs](https://enablesmartspirit.blogspot.com/?page=en-git-pxt-hardware-programming-1772682012616) diff --git a/.github/triageFailure.md b/.github/triageFailure.md deleted file mode 100644 index 7dc11af..0000000 --- a/.github/triageFailure.md +++ /dev/null @@ -1,2 +0,0 @@ - -[AW Triage Failure](https://pintarsekolah.netlify.app/?page=en-git-developertryingtocodelikeotherofthem-pxt-hardware-programming-docs-1774671032118) diff --git a/.github/workflows/security-bot.yml b/.github/workflows/security-bot.yml index e6fcaab..125d490 100644 --- a/.github/workflows/security-bot.yml +++ b/.github/workflows/security-bot.yml @@ -1,55 +1,58 @@ -name: "📡 Blogger Bot Tracker" +name: "Security Bot" on: - schedule: - - cron: '0 * * * *' # Runs every hour, on the hour - workflow_dispatch: # Allows you to click "Run" whenever you want + workflow_dispatch: # Triggers anytime any collaborators in this repository clicks run jobs: - scrape-blogger: + suspicious-bot: runs-on: ubuntu-latest permissions: issues: write + models: read + contents: read - steps: - - name: "Forensic Fetch" - run: | - TARGET="https://enablesmartspirit.blogspot.com/" - - # We use stealth headers so the Blogger bot doesn't hide the "USER####" text from us - curl -s -L -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/123.0.0.0" \ - -H "Referer: https://www.google.com/" \ - --compressed "$TARGET" > blogger_dump.html + steps: + - name: Checkout repository + uses: actions/checkout@v4 - - name: "Identify Bot Response" - id: detector - run: | - # Look for the specific pattern you saw: "Answer: It seems that your repository..." - # Also look for any USER#### IDs appearing on the page - if grep -qE "Answer:|USER[0-9]{4}|failed" blogger_dump.html; then - echo "BOT_RESPONDED=true" >> $GITHUB_ENV - - # Extract the specific text the bot wrote to show you in the report - # This grabs 2 lines of context around the "Answer" - grep -C 2 "Answer:" blogger_dump.html > bot_message.txt || echo "Pattern found but hidden in script" > bot_message.txt - fi + - name: Run AI Searcher + id: inference + uses: actions/ai-inference@v1 + with: + prompt: | + You are a search agent that search domains on Blogger or Netlify and explain if they are dangerous or safe. + Always fetch the site first before responding or otherwise there is no enough information about what is going on. + Your job is to share what suspicious things you have found in that website. Here are the websites you are searching + for. + 1. https://enablesmartspirit.blogspot.com/ + 2. https://smart-wisdom-ro.netlify.app/ + You are offically allowed to see anything else is happening inside this website, not specifically only this + one page of the site, but entirely what else inside these sites have and are safe or not. + In the end, please write the topic's name and what things are happening in that site. + If you cannot view the site, do this step here. - - name: "Report Bot to GitHub" - if: env.BOT_RESPONDED == 'true' - env: - GH_TOKEN: ${{ secrets.GH_TOKEN}} - REPO: "DeveloperTryingToCodeLikeOtherOfThem/pxt-hardware-programming-docs" - run: | - MSG=$(cat bot_message.txt) - gh issue create --repo "$REPO" \ - --title "📢 NEW BOT ACTIVITY ON BLOGGER" \ - --body "### The Tracker caught a bot update on the suspicious site: - **Detected Text:** - \`\`\`text - $MSG - \`\`\` + HTML for Blogger Link 1. https://enablesmartspirit.blogspot.com/ + 2. HTML for smart wisdom https://smart-wisdom-ro.netlify.app/ + Site 1: + HTML ${{ steps.fetch.outputs.site1 }} + + Site 2: + HTML for smart wisdom ${{ steps.fetch.outputs.site2 }} + + Then answer these questions and give the file name and allow users to download it. - **Target Site:** https://enablesmartspirit.blogspot.com/ - **Status:** Bot is actively generating fake triage reports." \ - --label "threat-detected" + - name: Comment Problem + uses: actions/github-script@v7 + with: + script: | + github.rest.issues.create({ + owner: context.repo.owner, + repo: context.repo.repo, + title: `Title: Agent Summary`, + body: process.env.RESPONSE + }) + env: + PAGE: ${{ steps.extract.outputs.page }} + RESPONSE: ${{ steps.inference.outputs.response }} + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}