-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(security): address sonar vulnerabilities (#39)
- Loading branch information
1 parent
09a0e34
commit 9d235c0
Showing
2 changed files
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
FROM node:lts | ||
|
||
RUN groupadd --system bot \ | ||
&& useradd --system bot -g bot | ||
|
||
WORKDIR /app | ||
|
||
COPY src/ /app/src | ||
COPY package.json package-lock.json tsconfig.json .eslintrc.json /app/ | ||
|
||
RUN npm ci && npm run build | ||
RUN npm ci --ignore-scripts && npm run build | ||
|
||
RUN echo "" > .env | ||
|
||
USER bot | ||
|
||
CMD node /app/dist/index.js $ENV_FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export const getTweetIdFromPermalink = (url: string): string => url.match(/\d+$/)?.[0] || ''; | ||
export const getTweetIdFromPermalink = (url: string): string => url.match(/\d{19}$/)?.[0] || ''; |