From a13749ace529bf73360bd7151221b0abf4b7bc5a Mon Sep 17 00:00:00 2001 From: pxxguin Date: Wed, 23 Jul 2025 18:47:14 +0900 Subject: [PATCH 1/3] [Autofic] Create package.json and CI workflow --- .github/workflows/pr_notify.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/pr_notify.yml diff --git a/.github/workflows/pr_notify.yml b/.github/workflows/pr_notify.yml new file mode 100644 index 0000000..2b34036 --- /dev/null +++ b/.github/workflows/pr_notify.yml @@ -0,0 +1,20 @@ +name: PR Notifier + +on: + pull_request: + types: [opened, reopened, closed] + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - name: Notify Discord + env: + DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} + run: | + curl -H "Content-Type: application/json" -d '{"content": "🔔 Pull Request [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }}) by ${{ github.event.pull_request.user.login }} - ${{ github.event.action }}"}' $DISCORD_WEBHOOK_URL + - name: Notify Slack + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + run: | + curl -H "Content-Type: application/json" -d '{"text": ":bell: Pull Request <${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}> by ${{ github.event.pull_request.user.login }} - ${{ github.event.action }}"}' $SLACK_WEBHOOK_URL From d5aac0363803e6e5487a76d1e4bab187df7f5d51 Mon Sep 17 00:00:00 2001 From: pxxguin Date: Wed, 23 Jul 2025 18:47:18 +0900 Subject: [PATCH 2/3] [Autofic] 3 malicious code detected!! --- src/Analyser/Header/Useragent/Device/Mobile.js | 2 +- src/data/DeviceModels.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Analyser/Header/Useragent/Device/Mobile.js b/src/Analyser/Header/Useragent/Device/Mobile.js index 24ee73f..1d7db65 100644 --- a/src/Analyser/Header/Useragent/Device/Mobile.js +++ b/src/Analyser/Header/Useragent/Device/Mobile.js @@ -837,7 +837,7 @@ class Mobile { } } /* Finally identify it based on carrier */ - this.data.device.identifyModel(/\(([A-Z]+[0-9]+[A-Z])[^;]*; ?FOMA/iu, ua, { + this.data.device.identifyModel(/\(([A-Z]+[0-9]+[A-Z])[^;]*; ?FOMA/u, ua, { type: Constants.deviceType.MOBILE, carrier: 'DoCoMo', }); diff --git a/src/data/DeviceModels.js b/src/data/DeviceModels.js index 5b61635..b71a580 100644 --- a/src/data/DeviceModels.js +++ b/src/data/DeviceModels.js @@ -319,7 +319,7 @@ class DeviceModels { * @return {string} */ static getKey(pattern) { - return `${pattern}`.replace('\\', ''); + return `${pattern}`.replace(/\\/g, ''); } /** From e16634cf5e07a59c0e08ed006caf13f792ca15ee Mon Sep 17 00:00:00 2001 From: pxxguin Date: Wed, 23 Jul 2025 18:48:04 +0900 Subject: [PATCH 3/3] chore: remove CI workflow before upstream PR --- .github/workflows/pr_notify.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .github/workflows/pr_notify.yml diff --git a/.github/workflows/pr_notify.yml b/.github/workflows/pr_notify.yml deleted file mode 100644 index 2b34036..0000000 --- a/.github/workflows/pr_notify.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: PR Notifier - -on: - pull_request: - types: [opened, reopened, closed] - -jobs: - notify: - runs-on: ubuntu-latest - steps: - - name: Notify Discord - env: - DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} - run: | - curl -H "Content-Type: application/json" -d '{"content": "🔔 Pull Request [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }}) by ${{ github.event.pull_request.user.login }} - ${{ github.event.action }}"}' $DISCORD_WEBHOOK_URL - - name: Notify Slack - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - run: | - curl -H "Content-Type: application/json" -d '{"text": ":bell: Pull Request <${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}> by ${{ github.event.pull_request.user.login }} - ${{ github.event.action }}"}' $SLACK_WEBHOOK_URL