Skip to content

Document use case for environment variables CFL_* #132

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/build_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ See the [Provided Environment Variables](https://github.com/google/oss-fuzz/blob
page in OSS-Fuzz's `base-builder` image documentation for more details on
environment variables that are available to `build.sh`.

If some environment variables needs to be passed from your CI to the build,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remind me please, where is the code that makes this true? I'm not sure this is correct

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(such as `GOPROXY` for instance), any environment prefixed by `CFL_EXTRA_` can be used.
The first step is `export CFL_EXTRA_MYENV=$MYENV` in the CI script.
The second step is `export MYENV=$CFL_EXTRA_MYENV` in build.sh

## Fuzzer execution environment

You should not make any assumptions on the availability of dependent packages
Expand Down
2 changes: 1 addition & 1 deletion docs/running-clusterfuzzlite/gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ clusterfuzzlite-coverage:
rules:
- if: $MODE == "coverage"
before_script:
- export CFL_CONTAINER_ID=`cut -c9- < /proc/1/cpuset`
- export CFL_CONTAINER_ID=`docker ps -q -f "label=com.gitlab.gitlab-runner.job.id=$CI_JOB_ID" -f "label=com.gitlab.gitlab-runner.type=build"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

completes commit e647b6c

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@securitykernel @catenacyber do you think this change is safe to make for gitlab users or will break some of them?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

script:
- python3 "/opt/oss-fuzz/infra/cifuzz/cifuzz_combined_entrypoint.py"
artifacts:
Expand Down