-
Notifications
You must be signed in to change notification settings - Fork 23
Henrik S, Sarah T & Nathalie L #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
370c41b
28174c5
b57b084
6f3aeda
aef277d
297da19
c5da7d6
36bad35
cd83c44
51919c0
92bca35
b91d384
5b826bb
a9445f5
64acb07
ec27381
d93a1e9
ba14ecf
7377241
b5c3b5c
8d9a4b4
be67bf6
dab8760
d352f5b
5a16db9
8c995a1
d64d542
c0820ab
fe0ae41
ca7cafc
8120e7e
322b3fd
e93fad1
b82a7a7
d35a010
7d83cdb
b44fa68
28a32d4
4fe6199
77550c9
b56bbed
d13576d
7c67221
c7101ac
418669d
f30bea3
ea1512f
a6adb59
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| # For most projects, this workflow file will not need changing; you simply need | ||
| # to commit it to your repository. | ||
| # | ||
| # You may wish to alter this file to override the set of languages analyzed, | ||
| # or to provide custom queries or build logic. | ||
| # | ||
| # ******** NOTE ******** | ||
| # We have attempted to detect the languages in your repository. Please check | ||
| # the `language` matrix defined below to confirm you have the correct set of | ||
| # supported CodeQL languages. | ||
| # | ||
| name: "CodeQL Advanced" | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
| schedule: | ||
| - cron: '30 17 * * 4' | ||
|
|
||
| jobs: | ||
| analyze: | ||
| name: Analyze (${{ matrix.language }}) | ||
| # Runner size impacts CodeQL analysis time. To learn more, please see: | ||
| # - https://gh.io/recommended-hardware-resources-for-running-codeql | ||
| # - https://gh.io/supported-runners-and-hardware-resources | ||
| # - https://gh.io/using-larger-runners (GitHub.com only) | ||
| # Consider using larger runners or machines with greater resources for possible analysis time improvements. | ||
| runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | ||
| permissions: | ||
| # required for all workflows | ||
| security-events: write | ||
|
|
||
| # required to fetch internal or private CodeQL packs | ||
| packages: read | ||
|
|
||
| # only required for workflows in private repositories | ||
| actions: read | ||
| contents: read | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - language: javascript-typescript | ||
| build-mode: none | ||
| # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift' | ||
| # Use `c-cpp` to analyze code written in C, C++ or both | ||
| # Use 'java-kotlin' to analyze code written in Java, Kotlin or both | ||
| # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both | ||
| # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, | ||
| # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. | ||
| # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how | ||
| # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| # Add any setup steps before running the `github/codeql-action/init` action. | ||
| # This includes steps like installing compilers or runtimes (`actions/setup-node` | ||
| # or others). This is typically only required for manual builds. | ||
| # - name: Setup runtime (example) | ||
| # uses: actions/setup-example@v1 | ||
|
|
||
| # Initializes the CodeQL tools for scanning. | ||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v4 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
| build-mode: ${{ matrix.build-mode }} | ||
| # If you wish to specify custom queries, you can do so here or in a config file. | ||
| # By default, queries listed here will override any specified in a config file. | ||
| # Prefix the list here with "+" to use these queries and those in the config file. | ||
|
|
||
| # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
| # queries: security-extended,security-and-quality | ||
|
|
||
| # If the analyze step fails for one of the languages you are analyzing with | ||
| # "We were unable to automatically build your code", modify the matrix above | ||
| # to set the build mode to "manual" for that language. Then modify this step | ||
| # to build your code. | ||
| # ℹ️ Command-line programs to run using the OS shell. | ||
| # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | ||
| - name: Run manual build steps | ||
| if: matrix.build-mode == 'manual' | ||
| shell: bash | ||
| run: | | ||
| echo 'If you are using a "manual" build mode for one or more of the' \ | ||
| 'languages you are analyzing, replace this with the commands to build' \ | ||
| 'your code, for example:' | ||
| echo ' make bootstrap' | ||
| echo ' make release' | ||
| exit 1 | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@v4 | ||
| with: | ||
| category: "/language:${{matrix.language}}" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "codeQL.createQuery.qlPackLocation": "c:\\Users\\enriq\\OneDrive\\Skrivbord\\School\\yh-message-app-fullstack" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,41 @@ | ||
| # yh-message-app-fullstack | ||
| # yh-message-app-fullstack | ||
| Sarah Tjellander | ||
| - Har testat formulera texten på inlämning FAS 1 enligt Markdown guide på Dicso | ||
|
|
||
| Nathalie Loyd | ||
|
|
||
| Henrik Söderqvist | ||
|
|
||
| Server.js app.delete rad 238-251 | ||
| - Jag har föreslagit en kodändring med förklaring. | ||
|
|
||
| Index.css | ||
| - OKad | ||
|
|
||
| Server.js app.get rad 169-180 | ||
| - Jag har föreslagt en kodändring med förklaring. | ||
|
|
||
| Sever.js app.patch rad 211-228 | ||
| - Lagt till kommentar att meddelanden behöver valideras innan dem sparas i databasen. För undvika att skadlig kod skrivs in. | ||
|
|
||
|
|
||
| Backend .env.exemple | ||
| - dubbelkolla att http adressen endast används i utveckling .ent.exempel och inte i produktionskod. | ||
| - Inte hittat något, BASE_API använder https. | ||
|
|
||
|
|
||
| Server.js app.post rad 76-98 | ||
| - Risk: Information Disclosure och Brute Force. Krav: Rate Limiting | ||
|
|
||
| Frontend src i alla .jsx - Lagt kommentar i App.jsx | ||
| - Klassiskt utvecklarmisstag. Ta bort: console.log helt och hållet. | ||
|
|
||
| Frontend - server.js: return res.status rad 100-103 | ||
| - Föreslagit ändring av felmeddelande för att minksa risken att någon kan se vilka konton som finns. | ||
|
|
||
| Backend - models/Message.js: rad 18 - 20 | ||
| - Har lagt in förslag om att lägga in en begrännsning på längden av meddelandet. | ||
|
|
||
| Server.js - app.post login | ||
| - SÄKERHETSFÖRBÄTTRING: Generellt felmeddelande för inloggning | ||
| - även lagt in ny kod som säkerhetsval | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,5 @@ PORT=3000 | |
| MONGO_URL=connection-string-from-mongodb-atlas | ||
| JWT_SECRET=your-secret-here | ||
| FRONTEND_URL=http://localhost:5500 | ||
|
|
||
| # // FRONTEND_URL=http://localhost:5500 Det är en okrypterad adress och inte säker att använda. Är detta endast för utveckling? Säkerställ att det inte används i produktion. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tomma rader blir rödmarkerade för att de kan orsaka problem på vissa system. Ett linter-verktyg såsom Prettier (VS Code Extension) brukar rensa bort dessa små detaljer :) |
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Det märks tydligt att ni har försökt dokumentera era tankegångar och säkerhetsresonemang i koden, vilket gör det lättare att förstå syftet bakom vissa lösningar och modifieringar. Det känns särskilt värdefullt i lärandesammanhang där fokus ligger på att visa förståelse för processen. En möjlig förbättring hade dock kunnat vara att dela upp vissa längre kommentarer och koppla dem mer direkt till specifika kodrader eller kodblock. Det hade gjort kommentarerna ännu lättare att läsa och följa i relation till den faktiska implementationen. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| --- | ||
| lockVersion: 1.0.0 | ||
| dependencies: | ||
| codeql/concepts: | ||
| version: 0.0.25 | ||
| codeql/controlflow: | ||
| version: 2.0.35 | ||
| codeql/dataflow: | ||
| version: 2.1.7 | ||
| codeql/javascript-all: | ||
| version: 2.7.2 | ||
| codeql/mad: | ||
| version: 1.0.51 | ||
| codeql/regex: | ||
| version: 1.0.51 | ||
| codeql/ssa: | ||
| version: 2.0.27 | ||
| codeql/threat-models: | ||
| version: 1.0.51 | ||
| codeql/tutorial: | ||
| version: 1.0.51 | ||
| codeql/typetracking: | ||
| version: 2.0.35 | ||
| codeql/util: | ||
| version: 2.0.38 | ||
| codeql/xml: | ||
| version: 1.0.51 | ||
| codeql/yaml: | ||
| version: 1.0.51 | ||
| compiled: false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| library: false | ||
| warnOnImplicitThis: false | ||
| name: getting-started/codeql-extra-queries-javascript | ||
| version: 1.0.0 | ||
| dependencies: | ||
| codeql/javascript-all: ^2.7.2 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| /** | ||
| * This is an automatically generated file | ||
| * @name Hello world | ||
| * @kind problem | ||
| * @problem.severity warning | ||
| * @id javascript/example/hello-world | ||
| */ | ||
|
|
||
| import javascript | ||
|
|
||
| from File f | ||
| select f, "Hello, world!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jättebra
med den här README, det vissar er arbetsprocess på ett bra sätt.