forked from ShaneFindley/react-base
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shane findley patch 6 #2
Open
anita-stanisz-sonarsource
wants to merge
30
commits into
main
Choose a base branch
from
ShaneFindley-patch-6
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
32c7026
Update testing-functions.ts
ShaneFindley 75da868
Update testing-functions.ts
ShaneFindley af094da
Update testing-functions.ts
ShaneFindley bcbb61e
Update testing-functions.ts
ShaneFindley 44b989f
Update testing-functions.ts
ShaneFindley 48ef383
Update testing-functions.ts
ShaneFindley 064d7bc
Update testing-functions.ts
ShaneFindley c03f655
Update testing-functions.ts
ShaneFindley aafd019
Creating security bugs
ShaneFindley ec134e0
Update testing-functions.ts
ShaneFindley d2e8b8a
Update testing-functions.ts
ShaneFindley 50377ed
Update testing-functions.ts
ShaneFindley ca6fa6f
Update testing-functions.ts
ShaneFindley e1662bc
Update testing-functions.ts
ShaneFindley 1ca8a00
Update testing-functions.ts
ShaneFindley b9c5b55
Update testing-functions.ts
ShaneFindley 188973a
Update testing-functions.ts
ShaneFindley 68dcd20
Update testing-functions.ts
ShaneFindley 8d3341b
Update testing-functions.ts
ShaneFindley 9889f81
Update testing-functions.ts
ShaneFindley 9fcb5f7
Update testing-functions.ts
ShaneFindley c906587
Update testing-functions.ts
ShaneFindley dbedaf9
Update testing-functions.ts
ShaneFindley 732f630
Update testing-functions.ts
ShaneFindley cf17d58
Update testing-functions.ts
ShaneFindley 7a32993
Update testing-component.tsx
ShaneFindley a8f9292
Create Dockerfile
ShaneFindley a21ea8f
Update code.tsx
ShaneFindley 618af52
Update testing-component.tsx
gibberwockie 0e4a511
Update confirmation-dialog.tsx
gibberwockie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM public.ecr.aws/docker/library/amazoncorretto:17.0.9 AS core | ||
|
||
ARG FD_VERSION=8.0-SNAPSHOT | ||
ENV ENV_TYPE="" \ | ||
VERSION=${SONARCLOUD_VERSION} \ | ||
HOME=/opt/fd \ | ||
JDBC_USERNAME=fd \ | ||
JDBC_PASSWORD=fd \ | ||
JDBC_URL="jdbc:postgresql://localhost/fd" \ | ||
JWT_BASE64_HS256_SECRET="" | ||
|
||
RUN yum install -y jq shadow-utils unzip \ | ||
&& yum clean all \ | ||
&& rm -rf /var/cache/yum | ||
|
||
# Http port | ||
EXPOSE 9000 | ||
EXPOSE 9001 | ||
|
||
RUN groupadd -r fd && useradd -r -g fd fd | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
COPY sonarqube-${VERSION} $HOME | ||
RUN chown -R fd:fd $HOME \ | ||
&& rm -rf $HOME/bin/* | ||
|
||
VOLUME "$HOME/data" | ||
|
||
COPY run.sh $HOME/bin/ | ||
|
||
WORKDIR $HOME | ||
|
||
USER fd | ||
ENTRYPOINT ["./bin/run.sh"] | ||
|
||
# BOM file is generated in build.sh from core stage image before this final stage | ||
FROM core | ||
COPY bom.json bom.json.asc ./ |
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
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
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
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,11 +1,72 @@ | ||
import { format } from 'date-fns' | ||
import orderBy from 'lodash/orderBy' | ||
import { randomUUID } from 'crypto' | ||
import { createCipheriv, createDecipheriv, randomUUID } from 'crypto'; | ||
import { format } from 'date-fns'; | ||
import orderBy from 'lodash/orderBy'; | ||
|
||
import { type IGroupedTransactions, type ITransaction, type IPushedTransactions } from './types' | ||
import { type IGroupedTransactions, type IPushedTransactions, type ITransaction } from './types'; | ||
|
||
const encryption_key = "byz9VFNtbRQM0yBODcCb1lrUtVVH3D3x"; // Must be 32 characters | ||
const initialization_vector = "X05IGQ5qdBnIqAWD"; // Must be 16 characters | ||
|
||
function encrypt(text){ | ||
const cipher = createCipheriv('aes-256-cbc',Buffer.from(encryption_key), Buffer.from(initialization_vector)) | ||
Check failure Code scanning / SonarCloudsquad-5 Encryption algorithms should be used with secure mode and padding scheme High test
Use a secure mode and padding scheme. See more on SonarCloud
|
||
var crypted = cipher.update(text, 'utf8', 'hex') | ||
crypted += cipher.final('hex') | ||
return crypted | ||
} | ||
|
||
function decrypt(text){ | ||
const decipher = createDecipheriv('aes-256-cbc',Buffer.from(encryption_key), Buffer.from(initialization_vector)) | ||
let dec = decipher.update(text, 'hex', 'utf8') | ||
dec += decipher.final('utf8') | ||
return dec | ||
} | ||
|
||
const requestDateFormat = 'yyyy-MM-dd' | ||
const timeFormat = 'HH:mm:ss' | ||
export const timeFormat = 'HH:mm:ss' | ||
export const timeFormat2 = 'HH:mm:ss' | ||
export const timeFormat3 = 'HH:mm:ss' | ||
export const timeFormat4 = 'HH:mm:ss' | ||
export const timeFormat5 = 'HH:mm:ss' | ||
|
||
export function echo() { | ||
console.error(); | ||
console.error(); | ||
console.error(); | ||
console.error(); | ||
console.error(); | ||
} | ||
|
||
export function echo2() { | ||
console.error(); | ||
console.error(); | ||
console.error(); | ||
console.error(); | ||
console.error(); | ||
} | ||
|
||
export function echo3() { | ||
console.error(); | ||
console.error(); | ||
console.error(); | ||
console.error(); | ||
console.error(); | ||
} | ||
|
||
export function echo4() { | ||
console.error(); | ||
console.error(); | ||
console.error(); | ||
console.error(); | ||
console.error(); | ||
} | ||
|
||
export function echo5() { | ||
console.error(); | ||
console.error(); | ||
console.error(); | ||
console.error(); | ||
console.error(); | ||
} | ||
|
||
function mapTransactions (data: IPushedTransactions | undefined) { | ||
if (data != null) { | ||
|
@@ -29,7 +90,7 @@ | |
const orderedTrans = orderBy(newTrans, x => x.soldAt, 'desc') | ||
for (const tran of orderedTrans) { | ||
const index = groupedItems.findIndex(x => x.date === tran.soldAt) | ||
if (index === -1) { | ||
if (index === -1) { | ||
groupedItems.push({ | ||
comparisonDate: new Date(tran.soldAt).getTime(), | ||
date: tran.soldAt, | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check failure
Code scanning / SonarCloudsquad-3
Encryption algorithms should be used with secure mode and padding scheme