add minimum GitHub token permissions for workflows (#2664)

Signed-off-by: Varun Sharma <varunsh@stepsecurity.io>

Signed-off-by: Varun Sharma <varunsh@stepsecurity.io>
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b615060..d3dc5d0 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -9,6 +9,9 @@
 env:
   BUILD_DEPS: automake bison flex git libboost-all-dev libevent-dev libssl-dev libtool make pkg-config
 
+permissions:
+  contents: read
+
 jobs:
   # TODO windows and macos
   compiler:
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
index 5ae7ba7..69b8cbe 100644
--- a/.github/workflows/cmake.yml
+++ b/.github/workflows/cmake.yml
@@ -9,6 +9,9 @@
 env:
   BUILD_DEPS: bison flex g++ libboost-all-dev libevent-dev libssl-dev make cmake
 
+permissions:
+  contents: read
+
 jobs:
   compiler:
     runs-on: ubuntu-20.04