Skip to content
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

Sync with Pro #3

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Sync with Pro #3

wants to merge 3 commits into from

Conversation

lizard-boy
Copy link

OSS repo was last synced with Pro commit: 5134d9cc489dc167d2fd57fb57171bc6a57e7463
Synchronizing OSS repo with Pro commit 2ea8d06dfac60d2c0fd582450f6ba62bad0beb54
There are 4 commit(s) to sync.
Syncing...
* 6ec5e0f7832 chore: fix uses of deprecated function utcnow (#2339)
* 7a7dba2f40a chore: log the trace id in debug mode (#2337)
* Skipping (empty) 647bf3656f8 chore: dedup running extra builds when benchmarking and pushing release canidates (#2342)
* 2ea8d06dfac fix: deprecation errors with Uuidm for ocaml 5.2 (#2344)
Success!

Andre Kuhlenschmidt and others added 3 commits October 1, 2024 00:03
For non-SMS scans, it can be quite hard to find the trace. This PR logs
the trace id in debug log.

This only solves the problem when `--debug` is passed as well as
`--trace`, so for the future we should output it as part of the results
json or the error on a crash. However, it's better than the previous
state.

Test plan:

In an arbitrary folder, run

```
(python-virtualenv) ➜  misc semgrep --config p/default . --trace --pro --debug

┌──── ○○○ ────┐
│ Semgrep CLI │
└─────────────┘

semgrep version 1.90.0
...
[00.06][DEBUG](default): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[00.06][INFO]: Executed as: /Users/emma/workspace/semgrep-proprietary/OSS/cli/src/semgrep/bin/semgrep-core-proprietary -json -rules /var/folders/4h/r6m5kls56r98069rz7w7f2400000gp/T/tmp379zh00m.json -j 1 -targets /var/folders/4h/r6m5kls56r98069rz7w7f2400000gp/T/tmp6sce110s -timeout 5 -timeout_threshold 3 -max_memory 0 -fast -trace -deep_inter_file -timeout_for_interfile_analysis 0 . -debug
[00.06][INFO]: Version: 1.90.0
[00.06][INFO]: Tracing is enabled for this scan. The trace id is <53914f7e3a7612f09483a98c320a8f98>.
```

Also run it without `--pro`.

synced from Pro 7a7dba2f40afef0123d56915efca502917536f7d
…prietary#2344)

Fixing
[logs](https://github.com/semgrep/semgrep-proprietary/actions/runs/11078022721/job/30784508699).

Looks like this doesn't work for our 4.x ocaml environment. Good luck
guys!

synced from Pro 2ea8d06dfac60d2c0fd582450f6ba62bad0beb54
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This pull request updates UUID generation methods across multiple files to improve randomness, security, and compatibility with newer OCaml versions.

  • Updated Uuidm.v4_gen usage with random states in Test_LS_e2e.ml, Unit_LS.ml, and Lsp_.ml
  • Replaced Uuidm.v 'V4' with Uuidm.v4_gen (Stdlib.Random.State.make_self_init ()) () in Lsp_.ml
  • Changed Uuidm.of_bytes to Uuidm.of_binary_string in Gitlab_output.ml for OCaml 5.2 compatibility
  • Improved thread-safety in UUID generation for login sessions in Semgrep_login.ml

5 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants