Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
e8e2a2e
Potential fix for code scanning alert no. 1232
austenstone Jul 3, 2025
ae95aa0
Merge refs/heads/alert-autofix-1232 into autofixes
austenstone Jul 3, 2025
2683b89
Potential fix for code scanning alert no. 1446
austenstone Jul 3, 2025
201d94a
Merge refs/heads/alert-autofix-1446 into autofixes
austenstone Jul 3, 2025
8cc41c4
Potential fix for code scanning alert no. 1445
austenstone Jul 3, 2025
2d2fefb
Merge refs/heads/alert-autofix-1445 into autofixes
austenstone Jul 3, 2025
307cbbc
Potential fix for code scanning alert no. 1444
austenstone Jul 3, 2025
9ea71a9
Merge refs/heads/alert-autofix-1444 into autofixes
austenstone Jul 3, 2025
ddbe5b9
Potential fix for code scanning alert no. 1443
austenstone Jul 3, 2025
99f311d
Merge refs/heads/alert-autofix-1443 into autofixes
austenstone Jul 3, 2025
6705874
Potential fix for code scanning alert no. 1442
austenstone Jul 3, 2025
d3efbaa
Merge refs/heads/alert-autofix-1442 into autofixes
austenstone Jul 3, 2025
495b07d
Potential fix for code scanning alert no. 1441
austenstone Jul 3, 2025
910de36
Merge refs/heads/alert-autofix-1441 into autofixes
austenstone Jul 3, 2025
2b3ee62
Potential fix for code scanning alert no. 1232
austenstone Jul 4, 2025
bd26e9d
Merge refs/heads/alert-autofix-1232-f5253678 into autofixes
austenstone Jul 4, 2025
4301e6a
Potential fix for code scanning alert no. 1446
austenstone Jul 4, 2025
ffad543
Merge refs/heads/alert-autofix-1446-7ad72fbf into autofixes
austenstone Jul 4, 2025
581994b
Potential fix for code scanning alert no. 1445
austenstone Jul 4, 2025
a28c938
Merge refs/heads/alert-autofix-1445-4778e781 into autofixes
austenstone Jul 4, 2025
bd63acc
Potential fix for code scanning alert no. 1444
austenstone Jul 4, 2025
291d37c
Merge refs/heads/alert-autofix-1444-45027d99 into autofixes
austenstone Jul 4, 2025
545e0cb
Potential fix for code scanning alert no. 1443
austenstone Jul 4, 2025
039ab8b
Merge refs/heads/alert-autofix-1443-1fccdfbe into autofixes
austenstone Jul 4, 2025
7be9d18
Potential fix for code scanning alert no. 1442
austenstone Jul 4, 2025
050f235
Merge refs/heads/alert-autofix-1442-e845ff0d into autofixes
austenstone Jul 4, 2025
77acd71
Potential fix for code scanning alert no. 1441
austenstone Jul 4, 2025
57ec90f
Merge refs/heads/alert-autofix-1441-a62f47d3 into autofixes
austenstone Jul 4, 2025
1403557
Potential fix for code scanning alert no. 1232
austenstone Jul 4, 2025
08b1d3a
Merge refs/heads/alert-autofix-1232-72648932 into autofixes
austenstone Jul 4, 2025
dc93621
Potential fix for code scanning alert no. 1446
austenstone Jul 4, 2025
3e1e0fc
Merge refs/heads/alert-autofix-1446-4d2ad72b into autofixes
austenstone Jul 4, 2025
45de2c9
Potential fix for code scanning alert no. 1445
austenstone Jul 4, 2025
ce3d38c
Merge refs/heads/alert-autofix-1445-77c92602 into autofixes
austenstone Jul 4, 2025
835e874
Potential fix for code scanning alert no. 1444
austenstone Jul 4, 2025
7b13e53
Merge refs/heads/alert-autofix-1444-c14648b2 into autofixes
austenstone Jul 4, 2025
856358f
Potential fix for code scanning alert no. 1443
austenstone Jul 4, 2025
a9c255e
Merge refs/heads/alert-autofix-1443-373cd1de into autofixes
austenstone Jul 4, 2025
19373c1
Potential fix for code scanning alert no. 1442
austenstone Jul 4, 2025
586dbc7
Merge refs/heads/alert-autofix-1442-239b34fa into autofixes
austenstone Jul 4, 2025
927f2c3
Potential fix for code scanning alert no. 1441
austenstone Jul 4, 2025
c7c2ab2
Merge refs/heads/alert-autofix-1441-16f7a52c into autofixes
austenstone Jul 4, 2025
8b4f360
Potential fix for code scanning alert no. 1232
austenstone Jul 4, 2025
0c5ac8e
Merge refs/heads/alert-autofix-1232-03a14745 into autofixes
austenstone Jul 4, 2025
d0bd3f9
Potential fix for code scanning alert no. 1446
austenstone Jul 4, 2025
bf38b1c
Merge refs/heads/alert-autofix-1446-038ea934 into autofixes
austenstone Jul 4, 2025
6d7dbcd
Potential fix for code scanning alert no. 1445
austenstone Jul 4, 2025
3e98a3b
Merge refs/heads/alert-autofix-1445-1d850d48 into autofixes
austenstone Jul 4, 2025
0c02dca
Potential fix for code scanning alert no. 1444
austenstone Jul 4, 2025
9612547
Merge refs/heads/alert-autofix-1444-b8b12b02 into autofixes
austenstone Jul 4, 2025
a2f2c98
Potential fix for code scanning alert no. 1443
austenstone Jul 4, 2025
3f14185
Merge refs/heads/alert-autofix-1443-6fde4a38 into autofixes
austenstone Jul 4, 2025
9b55dd6
Potential fix for code scanning alert no. 1442
austenstone Jul 4, 2025
de61a74
Merge refs/heads/alert-autofix-1442-c4cf0f08 into autofixes
austenstone Jul 4, 2025
6f97eb2
Potential fix for code scanning alert no. 1441
austenstone Jul 4, 2025
24d4066
Merge refs/heads/alert-autofix-1441-66735cfb into autofixes
austenstone Jul 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
branches:
- main

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
branches:
- main

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Docker Deploy GHCR

permissions:
contents: read
packages: write

on:
push:
branches:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Frontend

permissions:
contents: read

on:
push:
branches:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Lint

permissions:
contents: read

on:
push:
branches:
Expand Down
16 changes: 13 additions & 3 deletions backend/src/controllers/survey.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,21 @@ class SurveyController {
async updateSurveyGitHub(req: Request, res: Response): Promise<void> {
let survey: SurveyType;
try {
const _survey = await surveyService.updateSurvey({
...req.body,
const sanitizedBody = {
id: req.body.id,
userId: req.body.userId,
org: req.body.org,
repo: req.body.repo,
prNumber: req.body.prNumber,
usedCopilot: req.body.usedCopilot,
percentTimeSaved: req.body.percentTimeSaved,
reason: req.body.reason,
timeUsedFor: req.body.timeUsedFor,
kudos: req.body.kudos,
hits: 0,
status: 'completed'
});
};
const _survey = await surveyService.updateSurvey(sanitizedBody);
if (!_survey) throw new Error('Survey not found');
survey = _survey;
res.status(201).json(survey);
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/survey.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SurveyService {
throw new Error('Invalid survey data provided');
}
const Survey = mongoose.model('Survey');
const result = await Survey.updateOne({ id: survey.id }, { $set: survey });
const result = await Survey.updateOne({ id: { $eq: survey.id } }, { $set: survey });

// Check if the update modified any document.
if (result.modifiedCount === 0) {
Expand Down
Loading