Skip to content

Commit 55ae4ab

Browse files
committed
fix: lock down permissions
1 parent 5bae9b4 commit 55ae4ab

File tree

6 files changed

+21
-11
lines changed

6 files changed

+21
-11
lines changed

.envrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
git config --local commit.gpgSign true
77
git config --local tag.gpgSign true
88

9+
# docker on mac expects linux/arm64/v8 but currently we don't publish that build
10+
if [[ "$(uname -s)" == "Darwin" ]] && [[ "$(uname -m)" == "arm64" ]]; then
11+
export DOCKER_DEFAULT_PLATFORM=linux/arm64
12+
fi
13+
914
export MIDNIGHT_NODE_IMAGE="midnightnetwork/midnight-node:0.8.0"
1015

1116
export POSTGRES_HOST="postgres" # TODO: replace with IP or host to postgres connection if not connecting to the docker one.

.github/ISSUE_TEMPLATE/documentation-improvement.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ assignees: ""
88

99
Documentation Improvement: Clearly describe the improvement requested for existing content and/or raise missing areas of documentation and provide details for what should be included.
1010

11-
### Documentation url:
11+
### Documentation URL:
1212
<!-- Specify the exact location of the documentation you are referencing. -->
1313

1414
### Description of Improvement:

.github/PULL_REQUEST_TEMPLATE/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
- [ ] All check jobs of the CI have succeeded
1313
- [ ] Self-reviewed the diff
1414
- [ ] Reviewer requested
15-
- [ ] Update README file (if relevant)
15+
- [ ] Update README.md file (if relevant)
1616
- [ ] Update documentation (if relevant)
17-
- [ ] No new TODOs introduced
17+
- [ ] No new todos introduced
1818

1919
## Links
2020

.github/workflows/ci.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: CI
22

3+
# ↓ lock down top‐level permissions to only what we use
4+
permissions:
5+
contents: read # we only need to checkout code
6+
actions: read # to query workflows/runs
7+
38
# Run on pushes to any branch and pull requests
49
on:
510
push:

cardano-cli.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fi
1414
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker run --rm \
1515
--network container:cardano-node \
1616
-e CARDANO_NODE_SOCKET_PATH="/ipc/node.socket" \
17-
-e CARDANO_NODE_NETWORK_ID=${CARDANO_NODE_NETWORK_ID} \
17+
-e CARDANO_NODE_NETWORK_ID="${CARDANO_NODE_NETWORK_ID}" \
1818
-v ~/ipc:/ipc \
19-
${CARDANO_IMAGE} \
20-
cli $*
19+
"${CARDANO_IMAGE}" \
20+
cli "$@"

midnight-node.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
if [ -z "$MIDNIGHT_NODE_IMAGE" ]; then
44
echo "Error: Env var MIDNIGHT_NODE_IMAGE is not set or is empty"
5-
echo "Please install direnv and run `direnv allow` to activate it."
5+
echo "Please install direnv and run 'direnv allow' to activate it."
66
exit 1
77
fi
88

99
docker run -it \
10-
-e CFG_PRESET=${CFG_PRESET} \
11-
-e DB_SYNC_POSTGRES_CONNECTION_STRING=${DB_SYNC_POSTGRES_CONNECTION_STRING} \
12-
-v ./data:/data ${MIDNIGHT_NODE_IMAGE} \
13-
$*
10+
-e CFG_PRESET="${CFG_PRESET}" \
11+
-e DB_SYNC_POSTGRES_CONNECTION_STRING="${DB_SYNC_POSTGRES_CONNECTION_STRING}" \
12+
-v ./data:/data "${MIDNIGHT_NODE_IMAGE}" \
13+
"$@"

0 commit comments

Comments
 (0)