Skip to content

feat: Citi Hackathon code submission#810

Closed
Psingle20 wants to merge 35 commits into
finos:mainfrom
Psingle20:CitiCodeSubmission
Closed

feat: Citi Hackathon code submission#810
Psingle20 wants to merge 35 commits into
finos:mainfrom
Psingle20:CitiCodeSubmission

Conversation

@Psingle20

@Psingle20 Psingle20 commented Nov 28, 2024

Copy link
Copy Markdown

This PR can be considered as a submission for the FinOS CitiHackathon.
Team members:


This PR solves issue #745 #788 #796 #797 #765

GITPROXY PLUGINS

We have worked on the following features :

  • Sensitive Data Detection ( in files like .json, .xlsx, .csv )
  • Check EXIF Metadata from Images ( .jpg, .jpeg, .tiff )
  • Detection of AI/ML usage (incl. weights, models etc.)
  • Vulnerability Detection using GitLeaks
  • Detection of Non-Standard Cryptography Usage

Some Modifications Non-Standard Cryptography Usage are required.

"authorisedList": [
    {
      "project": "finos",
      "name": "git-proxy",
      "url": "https://github.com/finos/git-proxy.git"
    },
    {
      "project": "project name",
      "name": "repo name",
      "url": "repo github url",
      "LocalRepoRoot": "specify you local repository path"
    }
  ],

Add the path to your local repository or working directory in the localRepoRoot in the authorisedList to give git-proxy access to your files.

Sensitive Data Detection ( in files like .json, .xlsx, .csv )

Features:
This solves issue #745

    "diff": {
      "block": {
        "literals": [],
        "patterns": [],
        "providers": {},
        "proxyFileTypes": [".csv", ".xlsx", ".log", ".json"]
      }
    },

Check EXIF Metadata from Images ( .jpg, .jpeg, .tiff )

Features:
This solves issue #796

    "diff": {
      "block": {
        "literals": [],
        "patterns": [],
        "providers": {},
        "proxyFileTypes": [".jpg", ".jpeg", ".tiff"]
      }
    },

Detection of AI/ML usage (incl. weights, models etc.)

Features:
This solves issue #788

    "aiMlUsage": {
          "enabled": true,
          "blockPatterns": ["modelWeights", "largeDatasets", "aiLibraries", "configKeys", "aiFunctions"]
    }

Vulnerability Detection using GitLeaks

Features:
This solves issue #797

    "checkForSecrets": {
      "enabled": false
    },
  • A detailed report will be generated gitleaks_reports.json
  • Some modifications / minor changes might be required for this to be merged.

Detection of Non-Standard Cryptography Usage

This solves issue #765

Features:

Psingle20 and others added 30 commits October 26, 2024 20:12
Signed-off-by: ChaitanyaD48 <chaitanya.d48@gmail.com>
…d cryptography

Signed-off-by: ChaitanyaD48 <chaitanya.d48@gmail.com>
Signed-off-by: ChaitanyaD48 <chaitanya.d48@gmail.com>
Signed-off-by: ChaitanyaD48 <chaitanya.d48@gmail.com>
@netlify

netlify Bot commented Nov 28, 2024

Copy link
Copy Markdown

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit cca6713
🔍 Latest deploy log https://app.netlify.com/sites/endearing-brigadeiros-63f9d0/deploys/67480028921c3c0008ee0d93

@Psingle20 Psingle20 changed the title feat:Citi code submission feat: Citi code submission Nov 28, 2024
@Psingle20

Psingle20 commented Nov 28, 2024

Copy link
Copy Markdown
Author

@JamieSlome @coopernetes we were working on some refactor on #798 PR and due to some merge conflicts we had to rollback and the PR got closed this PR contains all the commits we have done till 14-11-2024 please consider this as our submission . We will demonstrate it during our presentation.

you can check the commit history for the dates of hackathon period.

@Psingle20

Copy link
Copy Markdown
Author

@rgmz I have updated the gitleaks rules can you review it and suggest any other changes if needed?

@Psingle20 Psingle20 changed the title feat: Citi code submission feat: Citi Hackathon code submission Nov 28, 2024

@jescalada jescalada left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Psingle20 Thanks for the contribution! 🚀

It might be helpful to split this PR into smaller chunks for each of the issues solved. That will make it easier for us to review 🙂

I've checked out the #745 implementation only.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems this implementation isn't quite what was mentioned in #745. The goal of #745 is to allow blocking certain filenames, such as for example this-is-a-secret.js. We want to be able to use patterns to match these, like we can already do with commit messages and diffs.

The goal is to extend the commitConfig entry in proxy.config.json to include a filename entry:

"commitConfig": {
    "author": {
      "email": {
        "local": {
          "block": ""
        },
        "domain": {
          "allow": ".*"
        }
      }
    },
    "message": {
      "block": {
        "literals": [],
        "patterns": []
      }
    },
    "diff": {
      "block": {
        "literals": [],
        "patterns": [],
        "providers": {}
      }
    },
    "filename": {
      "block": {
        "literals": [],
        "patterns": []
      }
    }
  },

And then implement the logic for this in a push-action file, such as checkFilenames.js.

@rgmz

rgmz commented Jul 25, 2025

Copy link
Copy Markdown
Contributor

The Gitleaks portion of this PR might be superseded by #1010.

@Psingle20

Copy link
Copy Markdown
Author

Hi @jescalada,

This PR was initially created to gather all the features developed during the hackathon in one place. While we could raise a new PR, I believe there have been several new features added since the hackathon, so we’ll need to adjust accordingly.

Also, as @coopernetes suggested, instead of adding it to chain , we should consider refactoring these into plugins. That might require some restructuring to align with the new direction.

@06kellyjac 06kellyjac added the citi-hackathon Related to the Citi India Hackathon (Oct '24) label Sep 25, 2025
@jescalada

Copy link
Copy Markdown
Contributor

@Psingle20 I'll be closing this PR as we're cleaning up our backlog. It would be fantastic if you could adapt these push actions into plugins as explained in the plugin guide. Feel free to open individual PRs associated with each issue so it's easier to review.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

citi-hackathon Related to the Citi India Hackathon (Oct '24) feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants