diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..038ae30 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,37 @@ +name: CodeQL Analysis + +on: + push: + branches: [develop] + pull_request: + branches: [develop] + +jobs: + codeql: + name: Analyze with CodeQL + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: [javascript] + # You can add more languages if needed + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Autobuild project + run: npm install + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/App.tsx b/App.tsx index 9ea9412..49a44f6 100644 --- a/App.tsx +++ b/App.tsx @@ -15,7 +15,14 @@ const authConfig = { domain: process.env.EXPO_PUBLIC_OAUTH_DOMAIN, redirectSignIn: process.env.EXPO_PUBLIC_OAUTH_REDIRECT_SIGN_IN, redirectSignOut: process.env.EXPO_PUBLIC_OAUTH_REDIRECT_SIGN_OUT, - responseType: process.env.EXPO_PUBLIC_OAUTH_RESPONSE_TYPE + responseType: process.env.EXPO_PUBLIC_OAUTH_RESPONSE_TYPE, + scope: [ + "phone", + "email", + "openid", + "profile", + "aws.cognito.signin.user.admin", + ] } }; diff --git a/New Text Document.txt b/New Text Document.txt deleted file mode 100644 index 4212eda..0000000 --- a/New Text Document.txt +++ /dev/null @@ -1,21 +0,0 @@ - // // upload images to S3 bucket - // const fileContent = Buffer.from( - // req.body.images.replace(/^data:image\/\w+;base64,/, ""), - // "base64", - // ); - // const putObjectParams = { - // Bucket: bucketName + "/public/" + uuid, - // Key: uuid + "_0.jpg", - // Body: fileContent, - // ContentEncoding: "base64", - // ContentType: "image/jpeg", - // }; - // console.log(putObjectParams); - // try { - // const response = await s3Client.send(new PutObjectCommand(putObjectParams)); - // console.log(response); - // } catch (err) { - // console.error(err); - // } - -Cannot do serverless image upload with api gateway and lambda function because base64 image payload is too big \ No newline at end of file