From 5c7d68ec5d2c050ca7d747053b3eae7d0c6ef985 Mon Sep 17 00:00:00 2001 From: seoonju Date: Wed, 30 Jul 2025 21:15:53 +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 9a001217b25dd72bfcb22842f511b7edadb141cc Mon Sep 17 00:00:00 2001 From: seoonju Date: Wed, 30 Jul 2025 21:16:00 +0900 Subject: [PATCH 2/3] [ AutoFiC ] 1 malicious code detected!! --- src/users/UserController.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/users/UserController.js b/src/users/UserController.js index b0709fd..30f59b3 100644 --- a/src/users/UserController.js +++ b/src/users/UserController.js @@ -6,7 +6,7 @@ const getByEmail = async(req, res) => { const user = await UserService.getByEmail(req.params.email) if (!user) return res.status(404).json({ message: 'NOT_FOUND' }) - res.send(user) + res.json(user) // Changed from res.send(user) to res.json(user) } catch (err) { handleError(res, err) } @@ -17,7 +17,7 @@ const getById = async(req, res) => { const user = await UserService.getById(req.params.id) if (!user) return res.status(404).json({ message: 'NOT_FOUND' }) - res.send(user) + res.json(user) // Changed from res.send(user) to res.json(user) } catch (err) { handleError(res, err) } @@ -37,7 +37,7 @@ const update = async(req, res) => { const user = await UserService.update(req.params.id, req.body) if (!user) return res.status(404).json({ message: 'USER_NOT_FOUND' }) - res.send(user) + res.json(user) // Changed from res.send(user) to res.json(user) } catch (err) { handleError(res, err) } @@ -58,7 +58,7 @@ const deleteUser = async(req, res) => { const getAll = async(req, res) => { try { const users = await UserService.getAll() - res.send(users) + res.json(users) // Changed from res.send(users) to res.json(users) } catch (err) { handleError(res, err) } From 19c3ff3a88a307aac6e506dbeed053ebd30ff238 Mon Sep 17 00:00:00 2001 From: seoonju Date: Wed, 30 Jul 2025 21:16:15 +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