-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: only wrapping ENTRYPOINT, if present (#112)
* fix: only wrapping ENTRYPOINT, if present previously we were wrapping either CMD/ENTRYPOINT however that is incorrect behavior as it can change semantics of the image if the base image has any custom ENTRYPOINT For example official AWS lambda images have this problem and their ENTRYPOINT requires specific CMD shape and therefore we cannot adjust CMD without guaranteeing container behavior does not change. * fix(permissions): chalk runs for users without home directory In some cases chalk can run for uid which does not have a home directory such as in AWS lambda in which case chalk fails to resolve all paths which have ~ in them. This fixes that by ignoring those paths when resolvePath fails and in some other cases like for temp files also checks that tmp folder is writable. * switching to json for ecs metadata * fix: handling incorrect /chalk.json permissions * fix(ecs): sending ECS metadata as json object * feat(ecs): collecting more ecs metadata this now includes all task containers metadata as well as stats (if present) * feat(lambda): adding basic lambda metadata plugin * refactor: removing readOneFile() to nimutils.tryToLoadFile() * feat: extracting basic ecs metadata to dedicated keys * adding logs for exec command * feat: adding sink config priority field this allows to prioritize some sinks higher in the reporting order * bumping nimutils to remove debug help pager logs [ci skip] * fix: detaching stdin tty from chalk child process during exec otherwise we get `HUP` signal handling indicating there is an error which is incorrect as HUP is sent as part of TTY handling logic * fix: updating license check to honor years per file limiting first year to 2023, even though some files were committed in 2022 * feat: adding wrap_cmd option to wrap images without ENTRYPOINT * test: using unique path for each vendor test this allows tests not be exclusive as otherwise there are conflicts between tests * fix: running external tools only on insert commands * fix: skipping external tools on docker images at chalk time image is not built yet so we cannot run external tools on it yet * feat: adding sink retries via nimutils/con4m * fix: running external tools on context dir for docker builds
- Loading branch information
Showing
53 changed files
with
1,147 additions
and
282 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
args= | ||
for arg; do | ||
shift | ||
case "$arg" in | ||
--) | ||
break | ||
;; | ||
*) | ||
args="$args $arg" | ||
;; | ||
esac | ||
done | ||
|
||
for file; do | ||
years=$(git log --follow --oneline --format='%aI' -- "$file" | cut -d- -f1 | tail -n1) | ||
last=$(git log --follow --oneline --format='%aI' -- "$file" | cut -d- -f1 | head -n1) | ||
if [ "$years" = "2022" ]; then | ||
years=2023 | ||
fi | ||
if [ "$last" != "$years" ]; then | ||
years="$years-$last" | ||
fi | ||
if [ -z "$years" ]; then | ||
years=$(date +%Y) | ||
fi | ||
licenseheaders --years="$years" $args "$file" | ||
done |
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
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
Oops, something went wrong.