Skip to content
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

Multiple cause areas #622

Merged
merged 29 commits into from
Jan 11, 2024
Merged

Multiple cause areas #622

merged 29 commits into from
Jan 11, 2024

Conversation

adamalfredsson
Copy link
Collaborator

Continuation from #611

@adamalfredsson adamalfredsson mentioned this pull request Aug 22, 2023
8 tasks
@adamalfredsson adamalfredsson linked an issue Aug 22, 2023 that may be closed by this pull request
# Conflicts:
#	prisma/schema.prisma
#	src/routes/swish.ts
HAVING SUM(CauseAreasOrgSum) = 100;
`;

const [res] = await DAO.query(query, [input.donorId, input.taxUnitId, input.taxUnitId]);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Detected a mysql2 SQL statement that comes from a function argument. This could lead to SQL injection if the variable is user-controlled and is not properly sanitized. In order to prevent SQL injection, it is recommended to use parameterized queries or prepared statements.

View Dataflow Graph
flowchart LR
    classDef invis fill:white, stroke: none
    classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none

    subgraph File0["<b>src/custom_modules/DAO_modules/distributions.ts</b>"]
        direction LR
        %% Source

        subgraph Source
            direction LR

            v0("<b>[Line: 329]</b> input")
        end
        %% Intermediate

        subgraph Traces0[Traces]
            direction TB

            v2("<b>[Line: 303]</b> query")
        end
        %% Sink

        subgraph Sink
            direction LR

            v1("<b>[Line: 371]</b> query")
        end
    end
    %% Class Assignment
    Source:::invis
    Sink:::invis

    Traces0:::invis
    File0:::invis

    %% Connections

    Source --> Traces0
    Traces0 --> Sink

    %% Clickable

    click v0 href "https://github.com/stiftelsen-effekt/effekt-backend/blob/22e78626f18755ede87e2792191fcbac35bcbc5e/src/custom_modules/DAO_modules/distributions.ts#L329" "View in source" _blank
    click v1 href "https://github.com/stiftelsen-effekt/effekt-backend/blob/22e78626f18755ede87e2792191fcbac35bcbc5e/src/custom_modules/DAO_modules/distributions.ts#L371" "View in source" _blank
    click v2 href "https://github.com/stiftelsen-effekt/effekt-backend/blob/22e78626f18755ede87e2792191fcbac35bcbc5e/src/custom_modules/DAO_modules/distributions.ts#L303" "View in source" _blank
Loading
Ignore this finding from node-mysql-sqli.

@semgrep-app
Copy link

semgrep-app bot commented Aug 31, 2023

Semgrep found 1 node-mysql-sqli finding:

  • src/custom_modules/DAO_modules/distributions.ts: L57

Detected a mysql2 SQL statement that comes from a function argument. This could lead to SQL injection if the variable is user-controlled and is not properly sanitized. In order to prevent SQL injection, it is recommended to use parameterized queries or prepared statements.

View Dataflow Graph
flowchart LR
    classDef invis fill:white, stroke: none
    classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none

    subgraph File0["<b>src/custom_modules/DAO_modules/distributions.ts</b>"]
        direction LR
        %% Source

        subgraph Source
            direction LR

            v0("<b>[Line: 53]</b> sort")
        end
        %% Intermediate

        subgraph Traces0[Traces]
            direction TB

            v2("<b>[Line: 33]</b> queryString")
        end
        %% Sink

        subgraph Sink
            direction LR

            v1("<b>[Line: 57]</b> queryString")
        end
    end
    %% Class Assignment
    Source:::invis
    Sink:::invis

    Traces0:::invis
    File0:::invis

    %% Connections

    Source --> Traces0
    Traces0 --> Sink

    %% Clickable

    click v0 href "https://github.com/stiftelsen-effekt/effekt-backend/blob/22e78626f18755ede87e2792191fcbac35bcbc5e/src/custom_modules/DAO_modules/distributions.ts#L53" "View in source" _blank
    click v1 href "https://github.com/stiftelsen-effekt/effekt-backend/blob/22e78626f18755ede87e2792191fcbac35bcbc5e/src/custom_modules/DAO_modules/distributions.ts#L57" "View in source" _blank
    click v2 href "https://github.com/stiftelsen-effekt/effekt-backend/blob/22e78626f18755ede87e2792191fcbac35bcbc5e/src/custom_modules/DAO_modules/distributions.ts#L33" "View in source" _blank
Loading
Ignore this finding from node-mysql-sqli.

@fellmirr fellmirr merged commit 71314a3 into master Jan 11, 2024
1 of 2 checks passed
@fellmirr fellmirr deleted the multiple-cause-areas branch January 11, 2024 13:05
@adamalfredsson
Copy link
Collaborator Author

Amazing! 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrap up reconstruction of multiple cause area backup changes
2 participants