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

Implement file filter logic inside sechub-commons-archive and automate for PDS #1164

Closed
de-jcup opened this issue Mar 24, 2022 · 0 comments · Fixed by #1394
Closed

Implement file filter logic inside sechub-commons-archive and automate for PDS #1164

de-jcup opened this issue Mar 24, 2022 · 0 comments · Fixed by #1394

Comments

@de-jcup
Copy link
Member

de-jcup commented Mar 24, 2022

Situation

This is a sub issue of #1166

As a user I have a project which uses much java but also contains some code written in go

The configuration of uploaded source code in sechub.json will contain files of both languages, just inside code scan
filesystem configuration content.

Wanted

The administrator configured a product execution profile for the used sechub project which will use gosec and checkmarx product executor configurations.
But the admin wants to configure that go files are scanned by gosec and all other parts by checkmarx.
This shall be done at runtime configuration of product executor configuration entries.

Solution

  • Common product executor config (runtime) parameters to handle those parts
  • With Introduce sechub-commons-archive  #1323 we have ArchiveSupport.java and SecHubFileStructureConfiguration.java in charge for central
    archive handling combined with data section and binary handling ( PDS: Handle binaries.tar with data secion parts on PDS server side #1167)
  • We will extend SecHubFileStructureDataProvider to contain filter patterns (excludes an includes)
  • Filter data will come from the runtime parameters of executor configurations (done by DefaultExecutorConfigSupport or descendants.
  • PDSDefaultParameterKeyConstants
    • introduce pds.config.filefilter.excludes
    • introduce pds.config.filefilter.includes
  • On SecHub side we will introduce dedicated entries (where possiblle) but indedicated issues (e.g. for Automate file filtering for Checkmarx #1395 for Checkmarx). Inside this issue only implement PDS filtering.
  • Both file filter variants will provide a comma separated list - e.g. *.go,*.html will filter all go or HTML files from zip when extracted at execution side (PDS sidevs. executors running on sechub server side)
  • Filter behavior:
    • optional include file pattern entries: When empty, all files are included. When defined, only defined parts are included
    • optional exclude file pattern entries: When empty, all included files are accepted. If set, includes files except these will be accepted
@de-jcup de-jcup added this to the PDS 0.30.0 milestone Jun 13, 2022
@de-jcup de-jcup self-assigned this Jun 13, 2022
@de-jcup de-jcup changed the title Filter files by product executor configurations Implement file filter logic inside sechub-commons-archive and automate for PDS Jun 14, 2022
@haerter-tss haerter-tss modified the milestones: PDS 0.30.0, PDS 0.31.0 Jun 20, 2022
de-jcup added a commit that referenced this issue Jul 4, 2022
de-jcup added a commit that referenced this issue Jul 4, 2022
…-by-executor-configuration

Implemented logic for archive filtering #1164
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants