Skip to content

Commit 287843b

Browse files
authored
Merge pull request #80 from udx/1629
Security Enhancements & Package Updates [1629]
2 parents d88d0fa + 0118cff commit 287843b

File tree

3 files changed

+41
-5
lines changed

3 files changed

+41
-5
lines changed

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN apt-get update && \
2525
tzdata=2024b-6ubuntu1 \
2626
curl=8.11.1-1ubuntu1 \
2727
bash=5.2.37-1ubuntu1 \
28-
apt-utils=2.9.18 \
28+
apt-utils=2.9.28 \
2929
gettext=0.23.1-1 \
3030
gnupg=2.4.4-2ubuntu22 \
3131
ca-certificates=20241223 \
@@ -35,7 +35,7 @@ RUN apt-get update && \
3535
unzip=6.0-28ubuntu6 \
3636
nano=8.3-1 \
3737
vim=2:9.1.0861-1ubuntu1 \
38-
python3.12=3.12.8-5 \
38+
python3.12=3.12.9-1 \
3939
python3-pip=25.0+dfsg-1 \
4040
supervisor=4.2.5-3 && \
4141
apt-get clean && \
@@ -123,7 +123,10 @@ COPY bin/entrypoint.sh /usr/local/bin/entrypoint.sh
123123

124124
# Set permissions during build
125125
RUN chmod +x /usr/local/bin/entrypoint.sh && \
126-
chown -R ${UID}:${GID} /usr/local/configs
126+
chown -R ${UID}:${GID} /usr/local/configs && \
127+
chown -R ${UID}:${GID} /usr/local/bin && \
128+
chown -R ${UID}:${GID} /usr/local/lib && \
129+
chmod -R g-w,o-w /usr/local/configs /usr/local/bin /usr/local/lib
127130

128131
# Create a symbolic link for the supervisord configuration file
129132
RUN ln -sf /usr/local/configs/supervisor/supervisord.conf /etc/supervisord.conf

docs/git-help.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,32 @@ git push -f
4242
- `-f` or `--force`: This option forces Git to push the amended commit to the remote repository, rewriting history.
4343

4444
> Note: Force pushing can overwrite changes in the remote repository, so use it carefully, especially when working in a shared environment.
45+
46+
### 4. Moving Unpushed Commits Between Branches
47+
48+
If you need to move an unpushed commit from one branch to another, you can use git cherry-pick. Here's an example of moving a commit from branch `UAT-69` to branch `1629`:
49+
50+
1. First, identify the unpushed commit on the source branch:
51+
```shell
52+
git log UAT-69 --not --remotes --oneline
53+
```
54+
55+
2. Note the commit hash from the output (e.g., `4cff367`)
56+
57+
3. Switch to the target branch and stash any current changes:
58+
```shell
59+
git checkout 1629
60+
git stash # if you have uncommitted changes
61+
```
62+
63+
4. Cherry-pick the commit:
64+
```shell
65+
git cherry-pick 4cff367
66+
```
67+
68+
5. Restore your stashed changes if any:
69+
```shell
70+
git stash pop
71+
```
72+
73+
> Note: The cherry-pick command creates a new commit on the target branch with the same changes but a different commit hash.

lib/secrets/gcp.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ resolve_gcp_secret() {
2727
return 1
2828
fi
2929

30-
# Output only the secret value
31-
printf "%s" "$secret_value"
30+
# For multiline secrets (like private keys), base64 encode them
31+
if [[ "$secret_value" == *"-----BEGIN"* ]] || [[ "$secret_value" == *$'\n'* ]]; then
32+
printf "%s" "$secret_value" | base64
33+
else
34+
printf "%s" "$secret_value"
35+
fi
3236
return 0
3337
}

0 commit comments

Comments
 (0)