Skip to content

Create hardcode.py#17

Open
sebastianrevuelta wants to merge 1 commit into
masterfrom
sebastianrevuelta-patch-1
Open

Create hardcode.py#17
sebastianrevuelta wants to merge 1 commit into
masterfrom
sebastianrevuelta-patch-1

Conversation

@sebastianrevuelta
Copy link
Copy Markdown
Owner

No description provided.

Comment thread hardcode.py
# ruleid: python-sqlalchemy-hardcoded-secret
create_engine("postgres://user:pass@localhost:5432/biz")
# ruleid: python-sqlalchemy-hardcoded-secret
create_engine("mysql+pymysql://root:aaaa@localhost:3306/aaa?charset=utf8")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A secret is hard-coded in the application. Secrets stored in source code, such as credentials, identifiers, and other types of sensitive data, can be leaked and used by internal or external malicious actors. Use environment variables to securely provide credentials and other secrets or retrieve them from a secure vault or Hardware Security Module (HSM).

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

    subgraph File0["<b>hardcode.py</b>"]
        direction LR
        %% Source

        subgraph Source
            direction LR

            v0("<b>[Line: 7]</b> #quot;mysql+pymysql://root:aaaa@localhost:3306/aaa?charset=utf8#quot;")
        end
        %% Intermediate

        %% Sink

        subgraph Sink
            direction LR

            v1("<b>[Line: 7]</b> create_engine(#quot;mysql+pymysql://root:aaaa@localhost:3306/aaa?charset=utf8#quot;)")
        end
    end
    %% Class Assignment
    Source:::invis
    Sink:::invis

    File0:::invis

    %% Connections

    Source --> Sink

    %% Clickable

    click v0 href "https://github.com/sebastianrevuelta/Chess/blob/b0993b078359223c11db083a725278c4293cb79d/hardcode.py#L7" "View in source" _blank
    click v1 href "https://github.com/sebastianrevuelta/Chess/blob/b0993b078359223c11db083a725278c4293cb79d/hardcode.py#L7" "View in source" _blank
Loading
Ignore this finding from python-sqlalchemy-hardcoded-secret.

Comment thread hardcode.py


# ruleid: python-sqlalchemy-hardcoded-secret
create_engine("postgres://user:pass@localhost:5432/biz")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A secret is hard-coded in the application. Secrets stored in source code, such as credentials, identifiers, and other types of sensitive data, can be leaked and used by internal or external malicious actors. Use environment variables to securely provide credentials and other secrets or retrieve them from a secure vault or Hardware Security Module (HSM).

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

    subgraph File0["<b>hardcode.py</b>"]
        direction LR
        %% Source

        subgraph Source
            direction LR

            v0("<b>[Line: 5]</b> #quot;postgres://user:pass@localhost:5432/biz#quot;")
        end
        %% Intermediate

        %% Sink

        subgraph Sink
            direction LR

            v1("<b>[Line: 5]</b> create_engine(#quot;postgres://user:pass@localhost:5432/biz#quot;)")
        end
    end
    %% Class Assignment
    Source:::invis
    Sink:::invis

    File0:::invis

    %% Connections

    Source --> Sink

    %% Clickable

    click v0 href "https://github.com/sebastianrevuelta/Chess/blob/b0993b078359223c11db083a725278c4293cb79d/hardcode.py#L5" "View in source" _blank
    click v1 href "https://github.com/sebastianrevuelta/Chess/blob/b0993b078359223c11db083a725278c4293cb79d/hardcode.py#L5" "View in source" _blank
Loading
Ignore this finding from python-sqlalchemy-hardcoded-secret.

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.

1 participant