Click here to Skip to main content
15,885,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The context here is that we have some very large code bases split into thousands of files, the default setup is that real time virus scanning is enforced on all systems. The real time scanning easily balloons out builds to take several minutes in some cases rather than less than a minute when real time scanning is disabled.

I'm trying to work out plausible alternatives that would keep all parties involved happy and maximize productivity while minimizing developer frustation.

Since we use git I thought I could use githooks to execute a script that scans the working directory of the repository (the directory with the .git folder in it)
I've read a bit about post-update and pre-commit hooks, I know pre-commit is typically used for enforcing some coding standard.

I've never used any hooks in git, but I'd like to try configure the git repository to scan files after pulling or out a branch.

Assuming that I have a shell script globally available on every developer machine to scan a directory (or better, individual files) how can I use githooks to reliably trigger that script every time a developer uses git to update a working copy of a file with git, or before they commit a file to git.

What I have tried:

I've tried to understand how the githooks work to the point where I think that postmerge is the closest I'll get, but I'll try it out tomorrow.
Posted
Comments
Kornfeld Eliyahu Peter 12-Jul-18 5:01am    
Are you saying that real-time-scan is active on folders with source code?
Dar Brett 12-Jul-18 7:59am    
Yes, that's correct.

At its' core it's a company policy issue - the kind that I'd lump with difficulty getting local admin access because security aren't convinced we need to be able to attach a debugger to IIS processes. The unfortunate side of working in a company where security trumps everything else when someone thinks to raise it.

Most of the developers involved have just resigned to that just being the way it is and go grab a coffee or stop to chat to someone while running a build. Really all I'm looking for is a solution where I can say that all third party executables and DLLs are getting scanned so that there's no resistance from security-minded, non-programmer IT folks.
Kornfeld Eliyahu Peter 12-Jul-18 8:11am    
I'm sorry to say that if it were possible to turn off - even temporary - virus scan on folder where it should I would feel very unsafe...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900